Skip to content

Instantly share code, notes, and snippets.

View arashmidos's full-sized avatar
🏠
Working from home

Arash arashmidos

🏠
Working from home
View GitHub Profile
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active June 28, 2024 18:51
Using multiple github accounts with 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.
@kuccello
kuccello / MainActivity.java
Last active August 28, 2023 10:14
An example MusicPlayer class that demonstrates how to use AudioFocus and a BroadcastReceiver to play audio cleanly on Android.
/*
Copyright 2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software