Skip to content

Instantly share code, notes, and snippets.

View Onnion's full-sized avatar
🎯
Focusing

Marcius Onnion

🎯
Focusing
  • São Paulo
  • 23:49 (UTC -03:00)
View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 09:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@itsmepetrov
itsmepetrov / nvm_fix.sh
Created November 12, 2015 13:51
Fix NVM to use from root (or sudo)
# StackOverflow: http://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo
# Source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps
# The below command seems to fix the problem
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
# The above command is a bit complicated, but all it's doing is copying whatever version of node
# you have active via nvm into the /usr/local/ directory (where user installed global files should
# live on a linux VPS) and setting the permissions so that all users can access them.