Skip to content

Instantly share code, notes, and snippets.

View cyrusfirheir's full-sized avatar
👾
npm i -g common-sense

Cyrus Firheir cyrusfirheir

👾
npm i -g common-sense
  • India
  • 23:51 (UTC +05:30)
View GitHub Profile
@Akjosch
Akjosch / handlers.js
Last active August 24, 2020 07:32
SugarCube macros for delayed execution handlers/triggers
/* SugarCube code block to be executed later */
Macro.add('handler', {
tags: null,
isAsync: true,
validIdRe: /^[A-Za-z_]\w*$/,
handler() {
if(this.args.length === 0) {
return this.error('Missing handler ID(s).');
}
const ids = Array.from(this.args);
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 24, 2024 13:28
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.