Posts in 2019

  • Remove Files From Git Repo as in Gitignore

    Wednesday, May 15, 2019 in Git

    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 …

    Read more

  • NodeJS - Unit Test DynamoDB

    Friday, May 10, 2019 in NodeJS

    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 # …

    Read more

  • How to Enable Disable Startup Services in Ubuntu

    Friday, March 15, 2019 in Ubuntu

    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 …

    Read more

  • How to Clear Cloudfront Cache Using Aws Cli

    Wednesday, January 09, 2019 in AWS

    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

    Read more

  • Extract Data From Json String

    Tuesday, January 08, 2019 in Shell

    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

    Read more

Posts in 2018

  • Steps to create never expiring Facebook access token

    Wednesday, July 04, 2018 in Social

    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) …

    Read more

Posts in 2017

  • Enable grub boot menu from window 10

    Friday, December 29, 2017 in Windows

    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 …

    Read more

  • MySQL MariaDB Export and Import

    Tuesday, December 26, 2017 in MySQL

    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 \ …

    Read more

  • MySQL MariaDB Create User

    Tuesday, December 26, 2017 in MySQL

    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; …

    Read more

  • MySQL MariaDB utf8 to utf8mb4

    Monday, December 25, 2017 in MySQL

    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: …

    Read more