Skip to content

Instantly share code, notes, and snippets.

@verticalgrain
Last active July 23, 2018 15:53
Show Gist options
  • Save verticalgrain/49abaa29aa36afe71088e6feb932f94e to your computer and use it in GitHub Desktop.
Save verticalgrain/49abaa29aa36afe71088e6feb932f94e to your computer and use it in GitHub Desktop.
*Nix Cheat Sheet
// Make something executable
sudo chmod +x /etc/rc.local
// Run several commands as root
sudo sh -c "echo 21 >/sys/class/gpio/export"
// List all groups
getent group
// List all users
getent passwd
// View file permsisions of files
ls -l
// Edit root crontab
sudo crontab -e
// SET UP NETWORKING VIA TERMINAL
// add the following to /etc/network/interfaces
// To join unsecured network (no password), leave out the wireless-key line
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid Your-Network-Name
wireless-key Your-Network-Password
// Find out some info about a process
ps aux | grep react-native
// Find the PID of a process
pgrep -f react-native
// Find the PID of a process running on a specific port
lsof -i :8081
// Download a static copy of a website with working links
wget -r -l10 --page-requisites --convert-links -e robots=off www.dossiercreative.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment