Skip to content

Instantly share code, notes, and snippets.

@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active Mar 22, 2019
Handling Multiple Github Accounts on MacOS
View handling_multiple_github_accounts.md

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

SHORTCUTS

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
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
tkf / .gitignore
Last active Mar 22, 2019
An implementation of Layer Normalization (Ba, Kiros & Hinton, 2016)
View .gitignore
/.cache
*.pyc
@yajra
yajra / install-wkhtmltopdf.sh
Last active Mar 22, 2019
Install wkhtmltopdf 0.12.4 (with patched qt)
View install-wkhtmltopdf.sh
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
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
diablo / autoexec.cfg
Last active Mar 22, 2019
Beta Config
View autoexec.cfg
// ██████████████████████████████████████████████████████
//
// ██████╗ ███████╗███╗ ███╗ ██████╗ ███╗ ██╗
// ██╔══██╗██╔════╝████╗ ████║██╔═══██╗████╗ ██║
// ██║ ██║█████╗ ██╔████╔██║██║ ██║██╔██╗ ██║
// ██║ ██║██╔══╝ ██║╚██╔╝██║██║ ██║██║╚██╗██║
// ██████╔╝███████╗██║ ╚═╝ ██║╚██████╔╝██║ ╚████║
// ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝
//
// ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗
@weavenet
weavenet / delete_all_object_versions.sh
Created May 4, 2015
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
View delete_all_object_versions.sh
#!/bin/bash
bucket=$1
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
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;
[InitializeOnLoad]
public class FileOpener : MonoBehaviour {
static string _emacsPath = "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient";
View lazynvm.sh
# lazyload nvm
# all props goes to http://broken-by.me/lazy-load-nvm/
# grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/
lazynvm() {
unset -f nvm node npm npx
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # 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.