Skip to content

Instantly share code, notes, and snippets.

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@vancaem
vancaem / Stringsdict-Xcode-file-template:.md
Created December 14, 2021 14:20
Stringsdict-Xcode-file-template:
@vancaem
vancaem / config: macOS apps I use.txt
Created June 18, 2019 21:27
Output of `ls /Applications | pbcopy`
1Password 7.app
2Do.app
Actual.app
Affinity Designer.app
Affinity Photo.app
Airtable.app
Alfred 3.app
Alfred Metadata Tool.app
Anki.app
Annotate.app
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user
@vancaem
vancaem / .ijmap sample
Created December 8, 2015 21:36 — forked from daveyheuser/.ijmap sample
Iconjar font mapping
{
"icons": {
"unicode here without \ or extra characters": {
"name" : "some name"
}
}
}
tell application "Safari"
set current_tab to current tab of front window
set tab_title to name of current_tab
set tab_address to URL of current_tab
tell application "Spillo"
show create bookmark panel with properties {url:tab_address, title:tab_title}
end tell
end tell
#!/usr/bin/env ruby
# encoding: utf-8
# tag primary folders =Tagname
# target them with #Tagname
# tag subfolders with @nickname
# target them with :nickname
# if no tagged folder exists but there's a matching folder name, that's used
# otherwise it will create folders based on :tags
# :tags can be strung together :bt:Drafts:testing for nesting
# Only one #Tag and one :path should exist in a file's tags
@vancaem
vancaem / gist:910d58d5e64ec9435394
Last active May 28, 2023 06:25 — forked from aquarius/gist:5823110
MindNode URL Schemes

#MindNode URL Schemes

mindnode:// mindnode://open?name=&folder= mindnode://open?name=todos
mindnode://open?name=my%20next%20presentation mindnode://open?name=my%20next%20presentation&folder=presentations

@vancaem
vancaem / gist:85b833b587dfe13eef73
Created August 5, 2014 00:21 — forked from aquarius/gist:5823110
MindNode URL Schemes

#MindNode URL Schemes

Basic

###Launch MindNode mindnode://

####Examples mindnode://

###Open Document

@vancaem
vancaem / 0_reuse_code.js
Last active April 12, 2016 17:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console