Skip to content

Instantly share code, notes, and snippets.

View TitouanT's full-sized avatar

Titouan Teyssier TitouanT

View GitHub Profile
gasman /
Created October 25, 2020 12:23
Encoding a file as a Youtube video -
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data =
WIDTH = 120
william8th / .tmux.conf
Last active September 29, 2023 02:39
Tmux open new pane in same directory
View .tmux.conf
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
set -g prefix C-space
unbind-key C-b
bind-key C-space send-prefix
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
fbrinker /
Last active August 5, 2023 20:23
Swap i3 displays / workspaces between displays
#!/usr/bin/env bash
# requires jq
DISPLAY_CONFIG=($(i3-msg -t get_outputs | jq -r '.[]|"\(.name):\(.current_workspace)"'))
for ROW in "${DISPLAY_CONFIG[@]}"
read -ra CONFIG <<< "${ROW}"
if [ "${CONFIG[0]}" != "null" ] && [ "${CONFIG[1]}" != "null" ]; then
pastleo /
Last active September 8, 2023 10:21
setup L2TP IPSEC VPN in archlinux using NetworkManager
raine /
Last active October 4, 2021 10:52
Connecting to gitter using weechat

Auth and copy token at

Ignore the /PASS thing, it doesn't work in weechat.

/server add gitter -ssl -ssl_verify -ssl_dhkey_size=1024 -password=<REPLACE_WITH_YOUR_TOKEN>
/connect gitter
soheilhy /
Last active September 25, 2023 20:18
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

lirenlin / gist:9892945
Last active May 1, 2023 01:30
i3 wm, hide window title bar
View gist:9892945