start new:
tmux
start new with session name:
tmux new -s myname
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)Picking the right architecture = Picking the right battles + Managing trade-offs
| #!/bin/bash | |
| # this script is not written by me. Just using it and sharing it here. | |
| # export DBUS_SESSION_BUS_ADDRESS environment variable useful when the script is set as a cron job | |
| PID=$(pgrep gnome-session) | |
| export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) | |
| # $bing is needed to form the fully qualified URL for |
| Development Status :: 1 - Planning | |
| Development Status :: 2 - Pre-Alpha | |
| Development Status :: 3 - Alpha | |
| Development Status :: 4 - Beta | |
| Development Status :: 5 - Production/Stable | |
| Development Status :: 6 - Mature | |
| Development Status :: 7 - Inactive | |
| Environment :: Console | |
| Environment :: Console :: Curses | |
| Environment :: Console :: Framebuffer |
| #!/bin/bash | |
| # This installs alacritty terminal on ubuntu (https://github.com/jwilm/alacritty) | |
| # You have to have rust/cargo installed for this to work | |
| # Install required tools | |
| sudo apt-get install -y cmake libfreetype6-dev libfontconfig1-dev xclip | |
| # Download, compile and install Alacritty | |
| git clone https://github.com/jwilm/alacritty |
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/[email protected] | \
sudo tee /etc/systemd/system/[email protected]
sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here