Skip to content

Instantly share code, notes, and snippets.

@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active May 25, 2024 16:50
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

@aln787
aln787 / findFilesWithExtension.go
Last active January 20, 2023 22:05
Go Lang find files with extension from the current working directory.
/* Go Lang find files with extension from the current working directory.
Copyright (c) 2010-2014 Alex Niderberg */
package main
import (
"fmt"
"os"
"path/filepath"
"regexp"
@hyg
hyg / gist:9c4afcd91fe24316cbf0
Created June 19, 2014 09:36
open browser in golang
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()