Skip to content

Instantly share code, notes, and snippets.

@drawveloper
drawveloper / nodejs-ubuntu-bind-port-80.md
Last active September 19, 2024 01:07
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command:

@germanramos
germanramos / gist:3944990c8e36383b6c6f
Last active August 29, 2015 14:10
Bash prompt with git info and completition and colors
In .bash_profile (or .bashrc):
# Git completion
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
# My prompt
#http://ubuntulife.files.wordpress.com/2011/04/bashcolor.png
export PS1='\e[01;36m\]\u:\[\e[01;33m\]\w $(__git_ps1 "(%s)")\[\e[0m\]\n>'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.