Skip to content

Instantly share code, notes, and snippets.

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

Kapil Jhajhria kapiljhajhria

🏠
Working from home
View GitHub Profile
@kapiljhajhria
kapiljhajhria / work-with-multiple-github-accounts.md
Created August 30, 2023 18:37 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@kapiljhajhria
kapiljhajhria / gist:4f38ffd9ac4858b02f098263329ceb75
Created October 25, 2022 17:31 — forked from jvenator/gist:9672772a631c117da151
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge

@kapiljhajhria
kapiljhajhria / iterm2.md
Created June 29, 2022 06:52 — forked from squarism/iterm2.md
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@kapiljhajhria
kapiljhajhria / gist:d7fb9739b1e7c6c15c850cd00ef5bbcc
Created June 3, 2022 07:05 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@kapiljhajhria
kapiljhajhria / messages.html
Created April 11, 2022 15:14 — forked from prasanthmj/messages.html
Parse and extract data from Gmail to Google Sheet. Read full article here: http://blog.gsmart.in/parse-and-extract-data-from-gmail-to-google-sheets/
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<title>Message Display Test</title>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>
<body style="padding:3em;">
<h1>Messages</h1>
<ul>

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@kapiljhajhria
kapiljhajhria / rails http status codes
Created February 1, 2022 12:45 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@kapiljhajhria
kapiljhajhria / add_user_and_reset_password_with_Firebase_admin_on_node.md
Created December 29, 2021 14:46 — forked from toraritte/add_user_and_reset_password_with_Firebase_admin_on_node.md
Sending password reset email after user has been created with Firebase Admin SDK (Node.js)

Sending password reset email after user has been created with Firebase Admin SDK (Node.js)

1. Install Firebase's Node modules

Install the Firebase Node modules:

$ npm install firebase firebase-admin --save
@kapiljhajhria
kapiljhajhria / nvmlink
Created December 11, 2021 07:36 — forked from MeLlamoPablo/nvmlink
Creates a symlink to /usr/bin/node after using nvm
@kapiljhajhria
kapiljhajhria / auth.dart
Created November 14, 2021 09:38 — forked from nikhilmufc7/auth.dart
Firebase Flutter Platform Exception Codes and example
// Error Codes for SignUp
ERROR_OPERATION_NOT_ALLOWED` - Indicates that Anonymous accounts are not enabled.
ERROR_WEAK_PASSWORD - If the password is not strong enough.
ERROR_INVALID_EMAIL` - If the email address is malformed.
ERROR_EMAIL_ALREADY_IN_USE - If the email is already in use by a different account.
ERROR_INVALID_CREDENTIAL` - If the [email] address is malformed.
// sending password reset email
ERROR_INVALID_EMAIL` - If the [email] address is malformed.