Skip to content

Instantly share code, notes, and snippets.

@glenntam
glenntam / truecolortui.sh
Last active September 7, 2023 05:20
HOWTO: mosh + tmux + browsh in 24bit True Color
#! /bin/bash
# Do you want to use mosh + tmux + browsh in glorious 16-million 24bit true color on your VPS?
# Of course you do. Here's how:
# First, you need to recompile Mosh from source to enable true color.
# (Among other things, you need protobuf to compile mosh).
apt update
apt install build-essential debhelper autotools-dev protobuf-compiler libprotobuf-dev dh-autoreconf pkg-config libutempter-dev zlib1g-dev libncurses5-dev libssl-dev bash-completion locales
cd $HOME
@glenntam
glenntam / postgres-webapp-boilerplate.sql
Last active January 22, 2024 00:31
HOWTO: Secure Postgres for Web Apps
/* Postgres web app boilerplate cheat sheet
I always hate the tedious set up needed whenever I want to write a new web app and wire up a database.
The first half of this cheat sheet is a Postgres script that can be used to instantiate and secure a new db.
The second half of the cheat sheet is a collection of useful snippets.
*/
/**************************************************************************************************************/
/* START "psql" and PASTE below. NOTE: Change "db_name", "admin_pw" and "user_pw" here to reflect your needs. */
/**************************************************************************************************************/