Skip to content

Instantly share code, notes, and snippets.

Jonalogy /
Last active Mar 22, 2019
Handling Multiple Github Accounts on MacOS

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
poopsplat / gist:7195274
Last active Mar 22, 2019
Mac Terminal Cheat Sheet
View gist:7195274


Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016
Safari border-radius + overflow: hidden + CSS transform fix
View gist:b602ab436ac9f05660d9c15190f4fd7b
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
tkf / .gitignore
Last active Mar 22, 2019
An implementation of Layer Normalization (Ba, Kiros & Hinton, 2016)
View .gitignore
yajra /
Last active Mar 22, 2019
Install wkhtmltopdf 0.12.4 (with patched qt)
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
mv wkhtmltox/bin/wkhtmlto* /usr/bin/
ln -nfs /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
diablo / autoexec.cfg
Last active Mar 22, 2019
Beta Config
View autoexec.cfg
// ██████████████████████████████████████████████████████
// ██████╗ ███████╗███╗ ███╗ ██████╗ ███╗ ██╗
// ██╔══██╗██╔════╝████╗ ████║██╔═══██╗████╗ ██║
// ██║ ██║█████╗ ██╔████╔██║██║ ██║██╔██╗ ██║
// ██║ ██║██╔══╝ ██║╚██╔╝██║██║ ██║██║╚██╗██║
// ██████╔╝███████╗██║ ╚═╝ ██║╚██████╔╝██║ ╚████║
// ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝
// ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗
weavenet /
Created May 4, 2015
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
View webpack.config.js
new UglifyJsPlugin({
uglifyOptions: {
compress: {
arrows: false,
booleans: false,
cascade: false,
collapse_vars: false,
comparisons: false,
computed_props: false,
hoist_funs: false,
accidentalrebel / fileopener.cs
Created Jan 22, 2018
Opens a text-based file from Unity in Emacs at the correct line.
View fileopener.cs
using UnityEngine;
using UnityEditor;
using System;
using System.IO;
using UnityEditor.Callbacks;
public class FileOpener : MonoBehaviour {
static string _emacsPath = "/Applications/";
# lazyload nvm
# all props goes to
# grabbed from reddit @
lazynvm() {
unset -f nvm node npm npx
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/" ] && . "$NVM_DIR/" # This loads nvm
if [ -f "$NVM_DIR/bash_completion" ]; then
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
You can’t perform that action at this time.