Posts in 2019
-
Remove Files From Git Repo as in Gitignore
Wednesday, May 15, 2019 in Git
Categories:
less than a minute
After you committed/pushed files to GIT repository, if you decide to ignore some files/directories using .gitignore then they won’t be automatically removed from git repository. Following command can be used for removing those ignored files …
-
NodeJS - Unit Test DynamoDB
Friday, May 10, 2019 in NodeJS
Categories:
2 minute read
Introduction This page explains how to mock dynamodb client using Sinon and Proxyqurie Required dependencies Install the following dependencies npm install --save-dev sinon npm install --save-dev proxyquire Sample Project Setup a sample project # …
-
How to Enable Disable Startup Services in Ubuntu
Friday, March 15, 2019 in Ubuntu
Categories:
less than a minute
Enable / Disable startup service Apache2 # Disable a startup service sudo systemctl disable apache2 # Or sudo update-rc.d apache2 disable # Enable a startup service sudo systemctl enable apache2 # Or sudo update-rc.d apache2 enable MySQL # Disable a …
-
How to Clear Cloudfront Cache Using Aws Cli
Wednesday, January 09, 2019 in AWS
Categories:
less than a minute
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/*' Replace $DISTRIBUTION_ID with the cloudfront distributions ID Reference: https://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-invalidation.html
-
Extract Data From Json String
Tuesday, January 08, 2019 in Shell
Categories:
less than a minute
myjson='{"somekey":"someval"}' v=`echo $myjson | jq '.somekey'` echo $v output: "someval" # Get the value wihout quotes v=`echo $myjson | jq -r '.somekey'` echo $v output: someval
Posts in 2018
-
Steps to create never expiring Facebook access token
Wednesday, July 04, 2018 in Social
Categories:
less than a minute
Open Graph API Explorer https://developers.facebook.com/tools/explorer Select the required application in the “Facebook App” drop-down menu Select “Get User Access Token” under “User or Page” (this opens a popup) …
Posts in 2017
-
Enable grub boot menu from window 10
Friday, December 29, 2017 in Windows
Categories:
less than a minute
Execute the following command from Windows 10 in command prompt (run as administrator) bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi Execution Logs for reference: Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights …
-
MySQL MariaDB Export and Import
Tuesday, December 26, 2017 in MySQL
2 minute read
Export the database Use the following command to export the database mysqldump --user=<<db-user>> --password=<<db-password \ --host=<<db-host>> --port=3306 \ --single-transaction --compress --routines \ …
-
MySQL MariaDB Create User
Tuesday, December 26, 2017 in MySQL
less than a minute
Create a user similar to root To create user with all the privileges similar to root. CREATE USER 'superuser'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'superuser'@'%' WITH GRANT OPTION; …
-
MySQL MariaDB utf8 to utf8mb4
Monday, December 25, 2017 in MySQL
less than a minute
Change server settings Refer: https://yottabrain.org/blog/database/mysql/mysql-mariadb-set-utf8mb4-as-default-charset/ on AWS RDS a parameter group needs to be created to apply above settings: refer: …