Skip to content

Instantly share code, notes, and snippets.

View seb26's full-sized avatar
🏠

Sebastian Reategui seb26

🏠
View GitHub Profile
@seb26
seb26 / tmux.conf
Last active August 23, 2024 22:03
Set the title of a Tmux pane to the SSH remote host currently active in that pane
## Tested on Tmux 3.4, macOS
## Set the title of a pane to
## - if during an SSH session, then `user@remotehost` - which is retrieved from first parameter after `ssh` of the active ssh process in that pane's tty
## - if not, the pane's current path
set-option -g automatic-rename on
set-option -g automatic-rename-format '#(PANE_SSH_REMOTE_HOST=$(ps -o command= -t "$(tmux display-message -p "#{pane_tty}")" | grep ssh | grep -v grep | cut -d" " -f2); [ -z "$PANE_SSH_REMOTE_HOST" ] && PANE_TITLE=$(tmux display-message -p "#{pane_current_path}") || PANE_TITLE="[$PANE_SSH_REMOTE_HOST]"; echo "$PANE_TITLE")'
set-option -g status-interval 1 # seconds
## Same as above, but:
@seb26
seb26 / truenas-install-sanoid.sh
Last active August 8, 2024 08:20
Please scroll down to read the README.md.
#!/usr/bin/env bash
# (c) Sebastian Reategui 2024 <http://github.com/seb26>
# MIT License
# USER OPTIONS
SANOID_HOME_CONFIG_PATH= # ~/.config/sanoid/sanoid.conf
SANOID_REPO_URL=https://github.com/jimsalterjrs/sanoid.git
@seb26
seb26 / instructions_non_standard_sequence_to_decklink.md
Last active April 1, 2022 09:19
Outputting a non-standard sequence resolution from Premiere Pro to an SDI monitor, using Blackmagic Decklink or UltraStudio Monitor device
@seb26
seb26 / A_one_line_formula.md
Last active January 3, 2024 19:50
This formula can be used in Google Sheets to take a value in bytes and then represent it in a human-readable format with binary units (KiB, MiB, GiB, and so on).
=ROUND( A2/(1024)^(FLOOR(log(A2)/log(1024))), 2) & " " & SWITCH( FLOOR( log(A2) / log(1024) ) ,0,"Bytes",1,"KiB",2,"MiB",3,"GiB",4,"TiB")