Skip to content

Instantly share code, notes, and snippets.

@matthewpalmer
Last active December 17, 2015 05:39
Show Gist options
  • Save matthewpalmer/5559243 to your computer and use it in GitHub Desktop.
Save matthewpalmer/5559243 to your computer and use it in GitHub Desktop.
Useful Terminal commands I can't remember

Curl

Use postdata npm module to extract the post data on the server. Use -k for https, -u for auth.

curl --data "param1=value1&param2=value2" https://localhost:3000/user/re
curl --data "param1=value1&param2=value2" -k -X POST https://localhost:3000/user/re
curl --form "[email protected]" https://localhost:3000/user/re
curl -u myusername:mypassword http://somesite.com

Git

git remote add origin URL
git pull --rebase
git push -u origin master

Tips

# Display hidden files. TRUE/FALSE. Then Alt-RightClick Finder in Dock and hit Relaunch
defaults write com.apple.finder AppleShowAllFiles TRUE
# Always open everything in Finder's list view.
defaults write com.apple.Finder FXPreferredViewStyle Nlsv

http://d.pr/i/aQLw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment