Are you over 18 and want to see adult content?
More Annotations
A complete backup of https://certum.pl
Are you over 18 and want to see adult content?
A complete backup of https://paulaabdul.com
Are you over 18 and want to see adult content?
A complete backup of https://moscowarborist.ru
Are you over 18 and want to see adult content?
A complete backup of https://hornbach.ro
Are you over 18 and want to see adult content?
A complete backup of https://mntc.org
Are you over 18 and want to see adult content?
A complete backup of https://digitrax.com
Are you over 18 and want to see adult content?
A complete backup of https://blagblagblag.org
Are you over 18 and want to see adult content?
A complete backup of https://nextdc.com
Are you over 18 and want to see adult content?
A complete backup of https://gamebainohu.org
Are you over 18 and want to see adult content?
A complete backup of https://vectusgdansk.pl
Are you over 18 and want to see adult content?
A complete backup of https://sbbcollege.edu
Are you over 18 and want to see adult content?
Favourite Annotations
A complete backup of www.elfagr.com/3882720
Are you over 18 and want to see adult content?
A complete backup of www.indiatoday.in/movies/bollywood/story/nachan-nu-jee-karda-radhika-madan-moves-like-mj-and-shah-rukh-khan
Are you over 18 and want to see adult content?
A complete backup of www.bbc.co.uk/sport/football/51623058
Are you over 18 and want to see adult content?
A complete backup of www.livehindustan.com/cricket/story-icc-women-s-t20-world-cup-2020-radha-yadav-praises-bowling-coach-narend
Are you over 18 and want to see adult content?
A complete backup of www.thehindubusinessline.com/news/sports/icc-womens-t20-world-cup-radha-yadav-takes-career-best-423-as-indi
Are you over 18 and want to see adult content?
Text
using fsevents.
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DUMP POSTGRESQL WITHOUT OWNER AND PRIVILEGES Manu S Ajith. 29 Dec 2015 • 1 min read. If you ever wanted to dump your postgres development database without the owner and the privileges, then you just need to run the following command: pg_dump database_name -O -x > output_file. Disqus Comments. We were unable to load Disqus. If you are a moderator please see our troubleshootingguide.
FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DUMP POSTGRESQL WITHOUT OWNER AND PRIVILEGES Manu S Ajith. 29 Dec 2015 • 1 min read. If you ever wanted to dump your postgres development database without the owner and the privileges, then you just need to run the following command: pg_dump database_name -O -x > output_file. Disqus Comments. We were unable to load Disqus. If you are a moderator please see our troubleshootingguide.
ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY Internet Explorer. "Compatibility View" is a compatibility mode feature of the web browser Internet Explorer in version 8 and later. When active, Compatibility View forces IE to display the webpage in Quirks mode as if the page were being viewed in IE7. When compatibility view is not activated, IE is said to be running innative mode.
MAKING DEPENDENT SERVICES WAIT TILL CONTAINERS ARE HEALTHY First, we configure docker to do a health check on our PostgreSQL container using the pg_isready command. Our PostgreSQL container will be marked as healthy only if the pg_isready command is successful and will remain unhealthy till it returns success. Next, we have to make our web app container depend on the health status of our PostgreSQL LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
HOW TO CALL VIEW HELPERS FROM CONTROLLER OR MODELS IN RAILS So if you ever want to access view helper methods from controller / models in rails 3 you have to use view_context method. Example. view_context.link_to 'Link', link_path (@link)}. PS: Just a note that you should avoid calling these functions within the controllers to follow mvc pattern conventions. HOW TO LOAD RAKE TASK FROM A CUSTOM FILE OR DIRECTORY Using variables inside binary pattern matching. I was refactoring a piece of code that I inherited in a codebase, which was parsing date from an external source in various formats into Date in HOW TO FIX INCOMPLETE RESPONSE RECEIVED FROM APPLICATION Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files MYSQL2::ERROR: ALL PARTS OF A PRIMARY KEY MUST BE NOT NULL Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files HOW TO TURN ON SQL DEBUG LOGGING FOR ACTIVERECORD If you want to see the SQL queries that your apps are running and want o optimize them or tune them, then it is a nice idea to log them. You can either log it to your log file or even to STDOUT. You can set thelog level in
FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY A compatibility mode is a software mechanism in which a software either emulates an older version of the software or mimics another operating system to allow older or incompatible software or files to remain compatible with the computer's newer hardware or software. ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DOCKER DIFFERENCE BETWEEN RUN, CMD, ENTRYPOINT COMMANDS The difference is ENTRYPOINT is that unlike CMD, the command and parameters are not ignored when Docker container runs with command line parameters. (There is a way to ignore ENTTRYPOINT, but it is unlikely that you will do it.) ENTRYPOINT instructions too FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY A compatibility mode is a software mechanism in which a software either emulates an older version of the software or mimics another operating system to allow older or incompatible software or files to remain compatible with the computer's newer hardware or software. ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DOCKER DIFFERENCE BETWEEN RUN, CMD, ENTRYPOINT COMMANDS The difference is ENTRYPOINT is that unlike CMD, the command and parameters are not ignored when Docker container runs with command line parameters. (There is a way to ignore ENTTRYPOINT, but it is unlikely that you will do it.) ENTRYPOINT instructions too FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY A compatibility mode is a software mechanism in which a software either emulates an older version of the software or mimics another operating system to allow older or incompatible software or files to remain compatible with the computer's newer hardware or software. MAKING DEPENDENT SERVICES WAIT TILL CONTAINERS ARE HEALTHY First, we configure docker to do a health check on our PostgreSQL container using the pg_isready command. Our PostgreSQL container will be marked as healthy only if the pg_isready command is successful and will remain unhealthy till it returns success. Next, we have to make our web app container depend on the health status of our PostgreSQL COPY FILE FROM HOST MACHINE TO DOCKER CONTAINER The docker cp utility copies the contents of SRC_PATH to the DEST_PATH.You can copy from the container’s file system to the local machine or the reverse, from the local filesystem to the container. If -is specified for either the SRC_PATH or DEST_PATH, you can also stream a tar archive from STDIN or to STDOUT.The CONTAINER can be a running or stopped container. HOW TO CALL VIEW HELPERS FROM CONTROLLER OR MODELS IN RAILS So if you ever want to access view helper methods from controller / models in rails 3 you have to use view_context method. Example. view_context.link_to 'Link', link_path (@link)}. PS: Just a note that you should avoid calling these functions within the controllers to follow mvc pattern conventions. AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DUMP POSTGRESQL WITHOUT OWNER AND PRIVILEGES Manu S Ajith. 29 Dec 2015 • 1 min read. If you ever wanted to dump your postgres development database without the owner and the privileges, then you just need to run the following command: pg_dump database_name -O -x > output_file. Disqus Comments. We were unable to load Disqus. If you are a moderator please see our troubleshootingguide.
HOW TO DISABLE ADOBE FLASH PLAYER UPDATE NOTIFICATION Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files GIT FATAL: REMOTE ORIGIN ALREADY EXISTS To add a new remote with an alternate name, called for example github instead of origin (which obviously already exists in your system), do the following: $ git remote add github git@github. com: username/repo_name.git. Alternatively, you can update the existing remote origin using the following command: $ git remote set-url origingit@github
FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY Internet Explorer. "Compatibility View" is a compatibility mode feature of the web browser Internet Explorer in version 8 and later. When active, Compatibility View forces IE to display the webpage in Quirks mode as if the page were being viewed in IE7. When compatibility view is not activated, IE is said to be running innative mode.
ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DOCKER DIFFERENCE BETWEEN RUN, CMD, ENTRYPOINT COMMANDS The difference is ENTRYPOINT is that unlike CMD, the command and parameters are not ignored when Docker container runs with command line parameters. (There is a way to ignore ENTTRYPOINT, but it is unlikely that you will do it.) ENTRYPOINT instructions too FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY A compatibility mode is a software mechanism in which a software either emulates an older version of the software or mimics another operating system to allow older or incompatible software or files to remain compatible with the computer's newer hardware or software. ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DOCKER DIFFERENCE BETWEEN RUN, CMD, ENTRYPOINT COMMANDS The difference is ENTRYPOINT is that unlike CMD, the command and parameters are not ignored when Docker container runs with command line parameters. (There is a way to ignore ENTTRYPOINT, but it is unlikely that you will do it.) ENTRYPOINT instructions too FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY A compatibility mode is a software mechanism in which a software either emulates an older version of the software or mimics another operating system to allow older or incompatible software or files to remain compatible with the computer's newer hardware or software. MAKING DEPENDENT SERVICES WAIT TILL CONTAINERS ARE HEALTHY First, we configure docker to do a health check on our PostgreSQL container using the pg_isready command. Our PostgreSQL container will be marked as healthy only if the pg_isready command is successful and will remain unhealthy till it returns success. Next, we have to make our web app container depend on the health status of our PostgreSQL COPY FILE FROM HOST MACHINE TO DOCKER CONTAINER The docker cp utility copies the contents of SRC_PATH to the DEST_PATH.You can copy from the container’s file system to the local machine or the reverse, from the local filesystem to the container. If -is specified for either the SRC_PATH or DEST_PATH, you can also stream a tar archive from STDIN or to STDOUT.The CONTAINER can be a running or stopped container. HOW TO CALL VIEW HELPERS FROM CONTROLLER OR MODELS IN RAILS So if you ever want to access view helper methods from controller / models in rails 3 you have to use view_context method. Example. view_context.link_to 'Link', link_path (@link)}. PS: Just a note that you should avoid calling these functions within the controllers to follow mvc pattern conventions. AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
DUMP POSTGRESQL WITHOUT OWNER AND PRIVILEGES Manu S Ajith. 29 Dec 2015 • 1 min read. If you ever wanted to dump your postgres development database without the owner and the privileges, then you just need to run the following command: pg_dump database_name -O -x > output_file. Disqus Comments. We were unable to load Disqus. If you are a moderator please see our troubleshootingguide.
HOW TO DISABLE ADOBE FLASH PLAYER UPDATE NOTIFICATION Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files GIT FATAL: REMOTE ORIGIN ALREADY EXISTS To add a new remote with an alternate name, called for example github instead of origin (which obviously already exists in your system), do the following: $ git remote add github git@github. com: username/repo_name.git. Alternatively, you can update the existing remote origin using the following command: $ git remote set-url origingit@github
FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
TIL.CODES - TODAY I LEARNED Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files was still being retained in the wal folder. Checking a. COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. MAKING DEPENDENT SERVICES WAIT TILL CONTAINERS ARE HEALTHY First, we configure docker to do a health check on our PostgreSQL container using the pg_isready command. Our PostgreSQL container will be marked as healthy only if the pg_isready command is successful and will remain unhealthy till it returns success. Next, we have to make our web app container depend on the health status of our PostgreSQL DEBUGGING GIT NETWORK CONNECTION ISSUES USING GIT_TRACE Welcome to GIT_TRACE. This configuration option gives us a more verbose trace to the git network connections and all the internal commands it goes through. This environment variable can accept the following values: 1, 2, or true. If this variable is set to 1, 2 or true ( the comparison is case insensitive), git will print trace:messages on
ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY Internet Explorer. "Compatibility View" is a compatibility mode feature of the web browser Internet Explorer in version 8 and later. When active, Compatibility View forces IE to display the webpage in Quirks mode as if the page were being viewed in IE7. When compatibility view is not activated, IE is said to be running innative mode.
HOW TO INSTALL A SPECIFIC PACKAGE VERSION IN ALPINE AND After some googling, I figured out that we can specify the version and lock it down so that the package manager will use that specific version of the package. So here is the same code now: RUN apk update && \ apk upgrade && \ apk add ruby= 2.2.4. Exploring the options, we can set a minimum or maximum version to any package using. HOW TO CALL VIEW HELPERS FROM CONTROLLER OR MODELS IN RAILS So if you ever want to access view helper methods from controller / models in rails 3 you have to use view_context method. Example. view_context.link_to 'Link', link_path (@link)}. PS: Just a note that you should avoid calling these functions within the controllers to follow mvc pattern conventions. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
HOW TO FIX NPM INSTALL FAILED WITH "CANNOT RUN IN WD" Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODB Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after AUTHORIZATION USING PUNDIT AND TESTING USING RSPEC Manu S Ajith. Oct 21, 2015 • 3 min read. Authorization is one of the important feature of any web app. With rails you can leverage the power of all those wonderful open source gems that are available to you or you can code your own authorization module. The most commonly used gems for authorization are Pundit and Cancan (now cancancan,since
ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. TIL.CODES - TODAY I LEARNED Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files was still being retained in the wal folder. Checking a. COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. MAKING DEPENDENT SERVICES WAIT TILL CONTAINERS ARE HEALTHY First, we configure docker to do a health check on our PostgreSQL container using the pg_isready command. Our PostgreSQL container will be marked as healthy only if the pg_isready command is successful and will remain unhealthy till it returns success. Next, we have to make our web app container depend on the health status of our PostgreSQL DEBUGGING GIT NETWORK CONNECTION ISSUES USING GIT_TRACE Welcome to GIT_TRACE. This configuration option gives us a more verbose trace to the git network connections and all the internal commands it goes through. This environment variable can accept the following values: 1, 2, or true. If this variable is set to 1, 2 or true ( the comparison is case insensitive), git will print trace:messages on
ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY Internet Explorer. "Compatibility View" is a compatibility mode feature of the web browser Internet Explorer in version 8 and later. When active, Compatibility View forces IE to display the webpage in Quirks mode as if the page were being viewed in IE7. When compatibility view is not activated, IE is said to be running innative mode.
HOW TO INSTALL A SPECIFIC PACKAGE VERSION IN ALPINE AND After some googling, I figured out that we can specify the version and lock it down so that the package manager will use that specific version of the package. So here is the same code now: RUN apk update && \ apk upgrade && \ apk add ruby= 2.2.4. Exploring the options, we can set a minimum or maximum version to any package using. HOW TO CALL VIEW HELPERS FROM CONTROLLER OR MODELS IN RAILS So if you ever want to access view helper methods from controller / models in rails 3 you have to use view_context method. Example. view_context.link_to 'Link', link_path (@link)}. PS: Just a note that you should avoid calling these functions within the controllers to follow mvc pattern conventions. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
HOW TO FIX NPM INSTALL FAILED WITH "CANNOT RUN IN WD" Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY Internet Explorer. "Compatibility View" is a compatibility mode feature of the web browser Internet Explorer in version 8 and later. When active, Compatibility View forces IE to display the webpage in Quirks mode as if the page were being viewed in IE7. When compatibility view is not activated, IE is said to be running innative mode.
HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODBMYISAM STORAGE ENGINEUNKNOWN STORAGE ENGINE INNODBUNKNOWN UNSUPPORTED STORAGEENGINE INNO…
Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLIAWS S3 VERSIONING Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
HOW TO DISABLE ADOBE FLASH PLAYER UPDATE NOTIFICATIONHOW TO DISABLE ADOBE FLASHHOW TO DISABLE ADOBE FLASHADOBE FLASH PLAYER FREE DOWNLOADADOBE FLASH PLAYER PLUGINENABLE ADOBE FLASH PLAYER WINDOWS 10STOP ADOBE FLASH UPDATE NOTICE Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files DUMP POSTGRESQL WITHOUT OWNER AND PRIVILEGESPOSTGRESQL DATABASE ACCESS PRIVILEGESPOSTGRESQL PRIVILEGES TABLEPOSTGRESQL USAGE PRIVILEGEPOSTGRESQL USER PRIVILEGES QUERY Manu S Ajith. 29 Dec 2015 • 1 min read. If you ever wanted to dump your postgres development database without the owner and the privileges, then you just need to run the following command: pg_dump database_name -O -x > output_file. Disqus Comments. We were unable to load Disqus. If you are a moderator please see our troubleshootingguide.
FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
FINDING LONG RUNNING SQL QUERIES IN POSTGRESQL Recently in one of the projects that I was working on, I came across a situation where the SQL query times was getting slower and slower perday,
BREW CASK: ERROR: UNKNOWN COMMAND: CASK Manu S Ajith. Sep 24, 2016 • 1 min read. After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask. Brew wasn't able to find the correct path and was causing this issue. USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY Internet Explorer. "Compatibility View" is a compatibility mode feature of the web browser Internet Explorer in version 8 and later. When active, Compatibility View forces IE to display the webpage in Quirks mode as if the page were being viewed in IE7. When compatibility view is not activated, IE is said to be running innative mode.
HOW TO FIX UNKNOWN/UNSUPPORTED STORAGE ENGINE: INNODBMYISAM STORAGE ENGINEUNKNOWN STORAGE ENGINE INNODBUNKNOWN UNSUPPORTED STORAGEENGINE INNO…
Hence I chose to remove the files. rm / var /lib/mysql/ib_logfile0 rm / var /lib/mysql/ib_logfile1. and then restart MySQL. root@docker # /etc/init.d/mysql start Starting MySQL database server: mysqld . .. Checking for tables which need an upgrade, are corrupt or were not closed cleanly.. root@docker #. And thats it, I now have my MySQLserver
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLIAWS S3 VERSIONING Luckily, AWS CLI S3 has some configurations to tweak concurrency settings, which I could easily tweak to adjust to my need. Setting the max_concurrent_requests in your aws config (~/.aws/config) s3 = max_concurrent_requests = 500 max_queue_size = 10000 use_accelerate_endpoint = true. I was to specify the max_concurrent_requests value, and after ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped working. All the setup instructions were in order, but still, for some reason, theemails were not
HOW TO DISABLE ADOBE FLASH PLAYER UPDATE NOTIFICATIONHOW TO DISABLE ADOBE FLASHHOW TO DISABLE ADOBE FLASHADOBE FLASH PLAYER FREE DOWNLOADADOBE FLASH PLAYER PLUGINENABLE ADOBE FLASH PLAYER WINDOWS 10STOP ADOBE FLASH UPDATE NOTICE Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files DUMP POSTGRESQL WITHOUT OWNER AND PRIVILEGESPOSTGRESQL DATABASE ACCESS PRIVILEGESPOSTGRESQL PRIVILEGES TABLEPOSTGRESQL USAGE PRIVILEGEPOSTGRESQL USER PRIVILEGES QUERY Manu S Ajith. 29 Dec 2015 • 1 min read. If you ever wanted to dump your postgres development database without the owner and the privileges, then you just need to run the following command: pg_dump database_name -O -x > output_file. Disqus Comments. We were unable to load Disqus. If you are a moderator please see our troubleshootingguide.
TIL.CODES - TODAY I LEARNED Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive files was still being retained in the wal folder. Checking a. FIX FOR 100% CPU USAGE BY NODE.JS Fix for 100% CPU usage by node.js. If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuildusing fsevents.
COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE The simplest solution to copy data from one database to another is to save to a local file and then restore it. \COPY users TO 'users.csv' CSV HEADER. The above command selects the data that you want and then writes it to a CSV file using the \copy command. Now its time to restore the CSV file to the second database. MAKING DEPENDENT SERVICES WAIT TILL CONTAINERS ARE HEALTHY First, we configure docker to do a health check on our PostgreSQL container using the pg_isready command. Our PostgreSQL container will be marked as healthy only if the pg_isready command is successful and will remain unhealthy till it returns success. Next, we have to make our web app container depend on the health status of our PostgreSQL USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY Internet Explorer. "Compatibility View" is a compatibility mode feature of the web browser Internet Explorer in version 8 and later. When active, Compatibility View forces IE to display the webpage in Quirks mode as if the page were being viewed in IE7. When compatibility view is not activated, IE is said to be running innative mode.
COPY FILE FROM HOST MACHINE TO DOCKER CONTAINER The docker cp utility copies the contents of SRC_PATH to the DEST_PATH.You can copy from the container’s file system to the local machine or the reverse, from the local filesystem to the container. If -is specified for either the SRC_PATH or DEST_PATH, you can also stream a tar archive from STDIN or to STDOUT.The CONTAINER can be a running or stopped container. ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED In postgreSQL you can specify the escape character by prefixing the letter E. From the PostgreSQL docs. PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g., E'foo'. HOW TO INSTALL A SPECIFIC PACKAGE VERSION IN ALPINE AND After some googling, I figured out that we can specify the version and lock it down so that the package manager will use that specific version of the package. So here is the same code now: RUN apk update && \ apk upgrade && \ apk add ruby= 2.2.4. Exploring the options, we can set a minimum or maximum version to any package using. AMS VZ JBUILDER VZ RABL VZ GRAPE-ENTITY VZ ROAR Grape Entity. Grape Entity was extracted from Grape, which is a popular gem used for building RESTful APIs. Similarly to RABL and Jbuilder, it provides a DSL for defining entities which are the structure of your JSON response. module API module Entities class Article < Grape::Entity expose :title expose :content, documentation:{ type: "Text
HOW TO FIX NPM INSTALL FAILED WITH "CANNOT RUN IN WD" Deleting stale Postgres wal files. I was debugging a system earlier today, where one of the postgres instances ran out of disk space, and taking a closer look at the system, I realised that the backup command was failing silently, but the postgres archive filesTODAY I LEARNED
ARTICLES AND LEARNINGS ON ELIXIR, RUBY, GO, JAVASCRIPT, DDD/CQRS/EVENT SOURCING AND FUNCTIONAL PARADIGMS* Home
* Github
* Nomad Life
Subscribe
rails
LETTER OPENER IS NOT PROCESSING EMAILS IN RAILS APP letter_opener is one of the most useful gems out there for a rails developer. The configuration is pretty much easy and straightforward. But yet I stumbled upon a situation where it stopped*
Manu S Ajith
1 min read
rspec
FIXING RSPEC TESTS INVOLVING TIMESTAMPS ON CIRCLECI. Use TimeCop gem or rspec be_within built in matcher to fix specs involving timestamps in CircleCI*
Manu S Ajith
1 min read
AWS
TUNING CONCURRENCY SETTINGS FOR AWS S3 CLI Tuning the max_concurrent_requests configuration for better performance when copying files from S3 buckets using the AWS CLI S3.*
Manu S Ajith
1 min read
internet explorer
USING X-UA-COMPATIBLE TO RENDER WEBSITES IN COMPATIBILITY MODE. Add X-UA-Compatible meta tags or headers to force Internet Explorer to run websites in compatibility mode. the same can be done by forcing http headers on web servers*
Manu S Ajith
3 min read
node
FIX FOR 100% CPU USAGE BY NODE.JS If you are on MacOs and you don't have installed fsevents, you might see a spike in CPU usage when running projects which watches the filesystem changes, especially projects like Webpack. To fix the issue, install fsevents or rebuild using fsevents.*
Manu S Ajith
1 min read
docker
MAKING DEPENDENT SERVICES WAIT TILL CONTAINERS ARE HEALTHY USINGDOCKER HEALTH CHECK
Using the health check option provided by docker we can make containers wait till the dependent containers are online and healthy*
Manu S Ajith
1 min read
elixir
HOW TO MAKE A GENSTAGE CONSUMER SUBSCRIBE ONLY TO PARTICULAR EVENTS ORSTREAM
Genstage consumer can optionally subscribe to some of the events produced by the producer by using GenStage.BroadcastDispatcher as dispatcher and by specifying a :selector function which filters out the events we are interested in*
Manu S Ajith
1 min read
linux
EXTENDING THE DISK SPACE ON AN EC2 INSTANCE How to extend disk space on an AWS EC2 instance or Elastic BeanStalk instance by extending the Elastic Block Store volume and resizing thepartition
*
Manu S Ajith
2 min read
blog
UPGRADE GHOST FROM V0.11 TO V1.0+ AND TWEAK CASPER THEME LAYOUT TO USE LIST INSTEAD OF CARDS How to update ghost from version v0.11 to v1.0 and up and tweaking the default casper theme for lists instead of cards, adding syntax highlighting, and bigger fonts*
Manu S Ajith
2 min read
adobe
HOW TO DISABLE ADOBE FLASH PLAYER UPDATE NOTIFICATION Well, lets not talk about the history/legacy of Flash/HTML5 etc here. Flash has its place but its really annoying when the Adobe Flash Player updater pops in when you are working*
Manu S Ajith
1 min read
ruby
DISABLE PRY AND EXIT DEBUGGER WITHOUT KILLING THE MAIN PROGRAM IN RUBY You ever ran into a situation where you had a huge loop running and you put a binding.pry within that loop for debugging and wondered how the hell you would exit the*
Manu S Ajith
1 min read
postgres
DON'T FORGET TO UPDATE THE SEQUENCE IN POSTGRESQL AFTER A COPY COMMAND You might have noticed that after bulk inserting records using the COPY statement in PostgreSQL the sequence IDs are not getting updated for any further inserts later on, and it would throw duplicate*
Manu S Ajith
1 min read
postgresql
COPY DATA FROM ONE POSTGRES INSTANCE TO ANOTHER. REMOTE COPY OPTIONS EXPLORED: COPY, CSV AND STDIN Various options to copy data from one Postgres database/table to another Postgres database or table using copy command.*
Manu S Ajith
3 min read
postgresql
ESCAPE CHARACTER SEQUENCE "E" IN POSTGRESQL EXPLAINED What's the "E" before a Postgres statement mean? Explaining the postgreSQL escape character sequence.*
Manu S Ajith
1 min read
rake
PASSING MULTIPLE OPTIONS/ARGUMENT WITH DEFAULT OPTIONS IN RAKE Rake task allows you to accept multiple arguments which can be used within the task, and also allows us to specify default options for these arguments. Accept multiple arguments/options Lets say we*
Manu S Ajith
1 min read
rails
HOW TO FIX THE INDEX NAME TOO LONG ERROR IN RAILS MIGRATIONS Today, I was reviewing some legacy code, trying to isolate the bottlenecks and pinpoint the optimisation strategies for scaling and performance optimisations of a rails app. As the usual procedure, Iwanted to
*
Manu S Ajith
1 min read
SQL
FIND OUT WHICH PART OF YOUR CODE IS TRIGGERING ACTIVERECORD OR SQLQUERIES.
Today, I got a new pet project to play with and my job was to identify the bottlenecks and performance improvements we can make in the application. So I wanted to jump in*
Manu S Ajith
1 min read
ssh
BYPASSING SSH FIREWALL BY OVERRIDING TYPE OF SERVICE HEADERS FOR TCPPACKETS IN ROUTERS
I was recently having issues when trying to ssh into one of my servers. The normal debugging techniques and solutions didn't work for me and I had to debug this in depth to*
Manu S Ajith
1 min read
git
DEBUGGING GIT NETWORK CONNECTION ISSUES USING GIT_TRACE I have been travelling a lot this month and working remotely from cafes and public places during my stay in Europe. And most often I was connected to the internet using the public*
Manu S Ajith
2 min read
ruby
SCRIPT/RUNNER VZ RAKE TASKS When it comes to running Rails tasks the common question that comes to mind is whether to use script/runner or to call a rake task script/runner long_running_task VZ rake*
Manu S Ajith
1 min read
ruby
ELEGANT WAY TO SILENTLY IGNORE A RUBY EXCEPTION I was working on a small hobby project and wanted to ignore some of the Exceptions that were raised. The first version of the code that I wrote was something similar to: def*
Manu S Ajith
1 min read
osx
BREW CASK: ERROR: UNKNOWN COMMAND: CASK After upgrading my OS to Sierra I was having an issue with homebrew. It failed to recognize the cask command and was throwing an error: brew cask install haskell-platform Error: Unknown command: cask*
Manu S Ajith
1 min read
devops
MANAGE SIDEKIQ WORKERS USING DEPLOYMENT SETUP AND CAPISTRANO In real world, most of the Rails applications would be having a Sidekiq instance as its companion in production systems. And it's a necessary thing to have some sort of mechanism to manage*
Manu S Ajith
1 min read
rails
HOW TO TURN ON SQL DEBUG LOGGING FOR ACTIVERECORD If you want to see the SQL queries that your apps are running and want o optimize them or tune them, then it is a nice idea to log them. Youcan either
*
Manu S Ajith
1 min read
js
HOW TO FIX NPM INSTALL FAILED WITH "CANNOT RUN IN WD" I was trying to upgrade my blogs ghost version to 0.9(which btw has some cool features) and I stumbled upon an issue when trying to upgrade the packages. Every time I*
Manu S Ajith
1 min read
Today I learned © 2019 Latest PostsTwitter Ghost
SUBSCRIBE TO TODAY I LEARNED Stay up to date! Get all the latest & greatest posts delivered straight to your inboxSubscribe
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0