Skip to content

Instantly share code, notes, and snippets.

View todgru's full-sized avatar

todgru

  • Portland, OR
View GitHub Profile
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 19, 2024 11:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 18, 2024 10:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active April 18, 2024 00:26
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.
@khalidx
khalidx / node-typescript-esm.md
Last active April 17, 2024 12:32
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@todgru
todgru / aws-ec2-redis-cli.md
Created June 12, 2014 23:01
AWS redis-cli on EC2
@scaryguy
scaryguy / change_primary_key.md
Last active April 8, 2024 14:23
How to change PRIMARY KEY of an existing PostgreSQL table?
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of  your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@davestevens
davestevens / LetsEncrypt.md
Last active March 28, 2024 10:35
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt