Skip to content

Instantly share code, notes, and snippets.

View robsenshuu's full-sized avatar
✌️
Hello!

Robert Avalos robsenshuu

✌️
Hello!
View GitHub Profile

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.
@robsenshuu
robsenshuu / HomeActivity.kt
Created September 22, 2020 17:15 — forked from antoniolg/HomeActivity.kt
Snackbar extensions on Kotlin, to create a useful small DSL.
class HomeActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)
setSupportActionBar(toolbar)
fab.setOnClickListener {
it.snack("Snack message") {
action("Action") { toast("Action clicked") }