Skip to content

Instantly share code, notes, and snippets.

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

yangtheman

🏠
Working from home
View GitHub Profile
@yangtheman
yangtheman / gist:7594851
Last active December 29, 2015 01:39
My ship wars code
function reset() {
turnTo(enemyBearing());
fire(enemyBearing());
turnTo(randomAngle());
warp(5);
}
var i = 0;
function update() {
@yangtheman
yangtheman / gist:7838217
Created December 7, 2013 07:14
Enable/disable user account on Windows 7
net user "user name" /active:no
net user "user name" /active:yes
# brew install
brew install gnupg21
# $HOME/.bash_profile
export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh"
gpg-agent --daemon --enable-ssh-support
# $HOME/bin/restartgpg
killall gpg-agent
gpg-agent --daemon --enable-ssh-support
@yangtheman
yangtheman / phoenix_heroku_reset_db.md
Created December 21, 2017 07:39 — forked from ventsislaf/phoenix_heroku_reset_db.md
Reset database on Heroku running Phoenix app

Note: Don't do this on a production evniroment!

Get the heroku database name:

heroku pg:info

Name can be found in the reponse from the command above. For example: Add-on: soaring-newly-1337.