- Some must-have scripts
/script install buffers.pl buffer_autoclose.py iset.pl go.py colorize_nicks.py
| #!/usr/bin/env python | |
| # vim: set fileencoding=utf-8 | |
| # | |
| # USAGE: | |
| # Back up your tmux old config, run the script and redirect stdout to your conf | |
| # file. Example: | |
| # | |
| # $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
| # $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
| # |
| #!/bin/bash | |
| # Takes an input of a number, to subtract from the current brightness. | |
| DIR=/sys/class/backlight/intel_backlight | |
| LVL=$1 | |
| MIN=100 | |
| CURR=$(head -n 1 "$DIR/brightness") |
| version: '2' | |
| services: | |
| db: | |
| image: postgres:16 | |
| ports: | |
| - "5432:5432" | |
| command: > | |
| postgres | |
| -c shared_preload_libraries='pg_stat_statements' |
| var isoCountries = { | |
| 'AF' : 'Afghanistan', | |
| 'AX' : 'Aland Islands', | |
| 'AL' : 'Albania', | |
| 'DZ' : 'Algeria', | |
| 'AS' : 'American Samoa', | |
| 'AD' : 'Andorra', | |
| 'AO' : 'Angola', | |
| 'AI' : 'Anguilla', | |
| 'AQ' : 'Antarctica', |
| #!/bin/sh | |
| # Print four lines showing blocks of colors: 0-7 | 0-7bold | 8-15 | 8-15bold | |
| perl -CADS -lwe ' | |
| my $block = shift || (chr(0x2588) x 3); | |
| for (["", 0], ["1;", 0], ["", 8], ["1;", 8]) { | |
| my ($bold, $offset) = @$_; | |
| my @range = map $offset + $_, 0..7; | |
| printf "%s %-6s ", $bold ? "bold" : "norm", "$range[0]-$range[-1]"; | |
| print map("\e[${bold}38;5;${_}m$block", @range), "\e[0m" | |
| } |
| function pwdx { | |
| lsof -a -p $1 -d cwd -n | tail -1 | awk '{print $NF}' | |
| } |