As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/usr/bin/env bash | |
| # Script to reverse engineer the build of a given Debian / Ubuntu server | |
| # I do this all the time: take an existing server, create a Bash / Ansible / Puppet / Chef | |
| # built script, to allow Continuous Depoyment. | |
| # It's tedious, but this script will give you the basics to get started. | |
| # Make sure you have "sudo" access to get all the details. | |
| # setup folders |
| WITH btree_index_atts AS ( | |
| SELECT nspname, relname, reltuples, relpages, indrelid, relam, | |
| regexp_split_to_table(indkey::text, ' ')::smallint AS attnum, | |
| indexrelid as index_oid | |
| FROM pg_index | |
| JOIN pg_class ON pg_class.oid=pg_index.indexrelid | |
| JOIN pg_namespace ON pg_namespace.oid = pg_class.relnamespace | |
| JOIN pg_am ON pg_class.relam = pg_am.oid | |
| WHERE pg_am.amname = 'btree' | |
| ), |
| # confirm you can access the internet | |
| if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then | |
| echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue." | |
| read | |
| fi | |
| # make 2 partitions on the disk. | |
| parted -s /dev/sda mktable msdos | |
| parted -s /dev/sda mkpart primary 0% 100m | |
| parted -s /dev/sda mkpart primary 100m 100% |
| " Vim color file | |
| " Name: herald.vim | |
| " Author: Fabio Cevasco <[email protected]> | |
| " Modified: More readable 256-color xterm version by Nathan St. Pierre <[email protected]> | |
| " Version: 0.2.0 | |
| " Notes: Supports 8, 16, 256 and 16,777,216 (RGB) color modes | |
| hi clear | |
| if exists("syntax_on") |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #! /usr/bin/env python | |
| """ Convert values between RGB hex codes and xterm-256 color codes. | |
| Nice long listing of all 256 colors and their codes. Useful for | |
| developing console color themes, or even script output schemes. | |
| Resources: | |
| * http://en.wikipedia.org/wiki/8-bit_color | |
| * http://en.wikipedia.org/wiki/ANSI_escape_code |