Skip to content

Instantly share code, notes, and snippets.

View davepatterson's full-sized avatar

David Patterson davepatterson

  • Chicago
View GitHub Profile
@davepatterson
davepatterson / work-with-multiple-github-accounts.md
Created February 26, 2024 23:17 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@davepatterson
davepatterson / httpie_examples.sh
Created October 15, 2017 00:18
Httpie Client Requests
http -f :8000/images/ filename="filename" filename@/Path/To/File "Content-Disposition:attachment; filename=filename.jpg"
@davepatterson
davepatterson / example.swift
Created January 7, 2016 14:25
Simple Swift Closure
class example {
func closureExample(completion:(status: Bool) -> Void) {
Alamofire.request(.GET, "").responseJSON { in response, result, data
if response {
completion(true)
} else {
completion(false)
}
// response ? completion(true) : completion(false)