Skip to content

Instantly share code, notes, and snippets.

View anupkrbid's full-sized avatar
🏠
Working from home

Anup Kumar Bid anupkrbid

🏠
Working from home
View GitHub Profile
@anupkrbid
anupkrbid / gh-pages-deploy.md
Created July 5, 2018 07:57 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@anupkrbid
anupkrbid / drawing-board.component.ts
Last active August 29, 2023 15:10
A example canvas component for drawing in an angular 6 app using rxjs 6.
import {
AfterViewInit,
Component,
ElementRef,
Input,
OnDestroy,
ViewChild
} from '@angular/core';
import { fromEvent } from 'rxjs';
import { pairwise, switchMap, takeUntil } from 'rxjs/operators';
@anupkrbid
anupkrbid / vs-code-cheatsheet.md
Last active October 10, 2023 16:31
VS Code Configuration Cheetsheet.
Up for evaluation
{
"liveServer.settings.donotShowInfoMsg": true,
"prettier.singleQuote": true,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.defaultFormatter": "ms-python.python"
@anupkrbid
anupkrbid / install_jdk_in_ubuntu_16.04.bash
Last active July 24, 2018 05:49
Installing jdk in ubuntu 16.04
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
#sudo apt-get install oracle-java9-installer
# For more config related info
# https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
#!/bin/bash
wget https://s3.ap-south-1.amazonaws.com/dynamodb-local-mumbai/dynamodb_local_latest.tar.gz
tar -xvzf dynamodb_local_latest.tar.gz -C ./LocalDynamoDB/
rm dynamodb_local_latest.tar.gz
cd LocalDynamoDB
#java -Djava.library.path=./DynamoDBLocal_lib/ -jar DynamoDBLocal.jar
cat dynamo > java -Djava.library.path=./DynamoDBLocal_lib/ -jar DynamoDBLocal.jar
@anupkrbid
anupkrbid / .htaccess
Last active July 24, 2018 05:47
.htaccess redirect settings
RewriteRule ^pricelist.php$ /prices [L,NC,R=301]
RewriteRule ^pricelist$ /prices [L,NC,R=301]
RewriteRule ^neighborhood.php$ /neighborhoods [L,NC,R=301]
RewriteRule ^neighborhood/(.*)$ /neighborhoods [L,NC,R=301]
RewriteRule ^dry_clean.php$ /service/dry-clean [L,NC,R=301]
RewriteRule ^dry_clean$ /service/dry-clean [L,NC,R=301]
RewriteRule ^wash_fold.php$ /service/washNfold [L,NC,R=301]
RewriteRule ^wash_fold$ /service/washNfold [L,NC,R=301]
RewriteRule ^corporate.php$ /service/corporate [L,NC,R=301]
RewriteRule ^corporate$ /service/corporate [L,NC,R=301]
https://askubuntu.com/questions/750498/mysql-5-5-update-to-mysql-5-7
@anupkrbid
anupkrbid / gist:36e27834fff1b6ed20e7194a2477696b
Created December 21, 2017 22:44
install_dynamodb_locally
#!/bin/bash
wget https://s3.ap-south-1.amazonaws.com/dynamodb-local-mumbai/dynamodb_local_latest.tar.gz
tar -xvzf dynamodb_local_latest.tar.gz -C ./LocalDynamoDB/
rm dynamodb_local_latest.tar.gz
cd LocalDynamoDB
#java -Djava.library.path=./DynamoDBLocal_lib/ -jar DynamoDBLocal.jar
cat dynamo > java -Djava.library.path=./DynamoDBLocal_lib/ -jar DynamoDBLocal.jar
@anupkrbid
anupkrbid / install_postman_native_app_on_ubuntu_16.04.bash
Last active July 24, 2018 05:50
Installing Postman Native App on ubuntu 16.04.
#!/bin/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo ln -s /opt/Postman/Postman /usr/bin/postman
@anupkrbid
anupkrbid / gist:9cf3d85e576c586fe384c8c20758c1ba
Created December 21, 2017 22:43
install_jdk_in_ubuntu_16.04
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
#sudo apt-get install oracle-java9-installer
# For more config related info
# https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04