Skip to content

Instantly share code, notes, and snippets.

@gbaptista
Last active December 12, 2015 01:58
Show Gist options
  • Save gbaptista/4694996 to your computer and use it in GitHub Desktop.
Save gbaptista/4694996 to your computer and use it in GitHub Desktop.
Bash tips.
# RVM sudo.
rvmsudo passenger-install-nginx-module
rvmsudo ruby test.rb
# Root console.
sudo clear; sudo gnome-terminal 2>/dev/null &
# Find service:
ps aux | grep 'nginx'
# Symbolic link:
ln -s /media/gbaptista/server/projects/wordpress/plugins/wp-git-embed/ wp-git-embed
# Hard link:
ln /media/gbaptista/server/zooey.js zooey.js
# See hidden files:
ls -a -l
# Permissions (500 664 755):
sudo chmod 755 file
sudo chown gbaptista:gbaptista file
sudo chmod 664 *; sudo chown gbaptista:gbaptista *; clear; ls -a -l
# Fix RVM Gems problem:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Important files:
# Hosts:
/etc/hosts
# Nginx configs:
/etc/nginx/conf.d/*.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment