Skip to content

Instantly share code, notes, and snippets.

@PixieStudio
PixieStudio / handling_multiple_github_accounts.md
Created September 22, 2020 13:39 — 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

@openmailbox
openmailbox / twitch_bot.rb
Last active August 16, 2025 15:56
A quick example of a Twitch chat bot using Ruby.
# A quick example of a Twitch chat bot in Ruby. No third party libraries. Just Ruby standard lib.
#
# This software is made available under the MIT License.
# Copyright (C) 2025 Brandon Rice
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active March 10, 2026 11:35
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

@3dd13
3dd13 / guest_user.rb
Last active June 22, 2022 09:16
some helper methods for handling guest user in Rails (with devise) ecommerce website
#
# User Stories:
# To start shopping easily,
# guest user wants to add items to shopping cart without signing up
#
#
# Code Explanation:
# - a guest_user is created when new user arrives to your website, so that he could have his own shopping cart, and adding items to shopping cart.
# - when the guest_user sign up, all items in the shopping cart should be transferred to the new signed up user account
#