Skip to content

Instantly share code, notes, and snippets.

View maarufadam's full-sized avatar

Ma'aruf Mohammed Adamu maarufadam

View GitHub Profile

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?

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.
@maarufadam
maarufadam / .gitconfig
Created October 28, 2022 09:18 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
@maarufadam
maarufadam / videos.txt
Created January 9, 2022 14:46
Public Videos
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4
@maarufadam
maarufadam / latitude_longitude.txt
Created November 19, 2021 10:20 — forked from pjobson/latitude_longitude.txt
Latitude / Longitude DMS, DDM, DD Regular Expressions
Degrees Minutes Seconds (DMS)
40° 26′ 46″ N 79° 58′ 56″ W
40° 26′ 46″ S 79° 58′ 56″ E
90° 0′ 0″ S 180° 0′ 0″ E
40° 26′ 45.9996″ N 79° 58′ 55.2″ E
Latitudes range from 0 to 90.
Longitudes range from 0 to 180.
Minutes & Seconds range from 0-60
Use N, S, E or W as either the last character,
which represents a compass direction North, South, East or West.