Skip to content

Instantly share code, notes, and snippets.

@DeveloperBeau
DeveloperBeau / handling_multiple_github_accounts.md
Created April 21, 2020 00:21 — forked from Jonalogy/handling_multiple_github_accounts.md
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

@DeveloperBeau
DeveloperBeau / prettier.config.js
Created December 18, 2017 22:13
Prettier Default settings
{
// "title": "Schema for prettier",
//
//
//"default": true,
//"description": "Print spaces between brackets in object literals.",
//"type": "boolean"
"bracketSpacing": true,
// "default": false,
# Function to open Xcode projects from the command line, call with 'xcode'
#note - this will not work as expected if you have multiple xcode projects/workspaces in the same folder.
xcode () {
workspace=$(ls -d *.xcworkspace/ 2>/dev/null)
proj=$(ls -d *.xcodeproj/ 2>/dev/null)
if [ -n "$workspace" ]; then
echo "found xcworkspace, opening now..."
open -a Xcode "$workspace"
return
#React native commands
#Android is different where the simulator has to be running before it can be built to a device.
#please note that you should replace the android model with the emulator you use.
#sleep is due to my own machine's time to bring up a simulator
#as run android has a chance to break if the simulator isn't up by the time it finishes compiling the app.
run-android () { $ANDROID_HOME/tools/emulator -avd Nexus_5X_API_23 &\
sleep 15;\
react-native run-android &\
wait }