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: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
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X POST -d '{ "user": { "email": "test@email.com", "password": "password" } }' http://localhost:3000/users
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X POST -d '{ "email": "test@email.com", "password": "password" }' http://localhost:3000/users/sign_in
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-API-EMAIL: user@example.com' -H 'X-API-TOKEN: 2-D9jBtnAPcP8fppzJAL' -X GET http://localhost:3000/private_homes
# 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.