Skip to content

Instantly share code, notes, and snippets.


Deepak Kumar Jha jhadeepakkumar14

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jhadeepakkumar14 on github.
  • I am jhadeepakkumar ( on keybase.
  • I have a public key ASAlMB4zFeKfjoUVxjblSOjEtm567CkE_TXAZmEJnaxQAgo

To claim this, I am signing this object:

jhadeepakkumar14 / fix-libv8-mac.txt
Created Apr 11, 2020 — forked from fernandoaleman/fix-libv8-mac.txt
Fixing libv8 and therubyracer on Mac
View fix-libv8-mac.txt
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

jhadeepakkumar14 /
Created Nov 17, 2018 — forked from joseluisq/
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)


Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
View kill running cron jobs whenever gem
ps aux | grep -ie rake | awk '{print $2}' | xargs kill -9
ps aux | grep -ie delayed_job | awk '{print $2}' | xargs kill -9
jhadeepakkumar14 /
Created Apr 12, 2018 — forked from Kartones/
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
jhadeepakkumar14 / ImageUploadComponent.jsx
Created Apr 6, 2018 — forked from hartzis/ImageUploadComponent.jsx
React Image Uploading Component with Image Preview
View ImageUploadComponent.jsx
class ImageUpload extends Component {
constructor(props) {
this.state = {
file: '',
imagePreviewUrl: ''
this._handleImageChange = this._handleImageChange.bind(this);
this._handleSubmit = this._handleSubmit.bind(this);
jhadeepakkumar14 / users.sql
Created Apr 2, 2018 — forked from rosswd/users.sql
Managing users in MySQL
View users.sql
-- start mysql daemon
mysql.server start
-- connect as root
mysql -u root -p
-- create a new limited user
-- [field] = placeholder for your situation
CREATE USER '[username]'@'localhost' IDENTIFIED BY '[password]';
GRANT SELECT, INSERT, UPDATE, ALTER ON *.* TO '[username]'@'localhost';
jhadeepakkumar14 / cloudSettings
Last active Jul 15, 2021 — forked from rosswd/
2017 MacOS Apps
View cloudSettings
jhadeepakkumar14 / dump.txt
Created Apr 2, 2018 — forked from rosswd/dump.txt
Database dumps
View dump.txt