start new:
tmux
start new with session name:
tmux new -s myname
# Solarized colours | |
function tab_sol_yellow { set_iterm_title "$1"; tab_color 181 137 0; } | |
function tab_sol_orange { set_iterm_title "$1"; tab_color 203 75 22; } | |
function tab_sol_red { set_iterm_title "$1"; tab_color 220 50 47; } | |
function tab_sol_magenta { set_iterm_title "$1"; tab_color 211 54 130; } | |
function tab_sol_violet { set_iterm_title "$1"; tab_color 108 113 196; } | |
function tab_sol_blue { set_iterm_title "$1"; tab_color 38 139 210; } | |
function tab_sol_cyan { set_iterm_title "$1"; tab_color 42 161 152; } | |
function tab_sol_green { set_iterm_title "$1"; tab_color 133 153 0; } |
#!/bin/bash | |
# <bitbar.title>Pretty Epoch Time</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>Anthony Clark</bitbar.author> | |
# <bitbar.author.github>anthonyclarka2</bitbar.author.github> | |
# <bitbar.desc>Displays epoch (unix) time separated by commas.</bitbar.desc> | |
# <bitbar.image>http://i.imgur.com/ltLqOcy.png</bitbar.image> | |
EPOCH=$(/bin/date +%s | /usr/local/opt/gnu-sed/libexec/gnubin/sed ':a;s/\B[0-9]\{3\}\>/,&/;ta') |
#!/usr/bin/bash | |
# https://unix.stackexchange.com/questions/301434/rsync-only-new-files-from-a-remote-server | |
# Modified by anthonyclarka2 AT GMAIL 2017-08-30. | |
# Comments, criticism welcome. | |
# exclude file has basic wildcards like *i386* or *debug* | |
# I have not tested this with anything other than rsync daemons, YMMV | |
SOURCE="rsync://server.example.edu/test" | |
# Remember the slash at the end of the destination |
#!/bin/bash -e | |
JDK_MAJOR_VERSION='8' | |
JDK_MINOR_VERSION='66' | |
JDK_FILENAME="jdk-${JDK_MAJOR_VERSION}u${JDK_MINOR_VERSION}-linux-x64.tar.gz" | |
JDK_DOWNLOAD_BASE='http://local-mirror.example.com/miscfiles/' | |
JDK_DOWNLOAD_URL="${JDK_DOWNLOAD_BASE}${JDK_FILENAME}" | |
JAVA_BASE_DIR="/opt/java" | |
JDK_TARBALL="${JAVA_BASE_DIR}/.download/${JDK_FILENAME}" |
# Other links: | |
# https://christophermonzon.wordpress.com/2016/10/04/centos-7-network-performance/ | |
# https://lwn.net/Articles/616241/ | |
# https://wiki.mikejung.biz/Sysctl_tweaks | |
# https://access.redhat.com/solutions/190643 | |
# http://fasterdata.es.net/network-tuning/udp-tuning/ | |
# MariaDB Tuning | |
vm.swappiness = 1 |
#!/bin/bash | |
# Creates a simple dokuwiki page, listing Borg backups from a text file | |
# File has one entry per line: "host.example.net-2017-08-31-02:55 Thu, 2017-08-31 02:55:03" | |
# Runs in cron early every morning: list-backups.sh host.example.net.txt > dokuwikipage.txt | |
BACKUP_LIST=$1 | |
HOST_NAME=$(basename -s .txt "${BACKUP_LIST}") | |
echo "====== ${HOST_NAME} Backup List ======" |
#!/bin/bash | |
# Scans the list of hosts and checks that | |
# DNS has a forward and reverse record for them | |
# Then compares the wiki host name with the PTR host name | |
# Generates a simple dokuwiki table | |
# runs in cron early every morning: | |
# check-dns-from-wiki.sh /data/wiki/data/pages/it/hostlist.txt > /data/wiki/data/pages/it/dnscheckresults.txt | |
# data is in a table, example: | |
# | [[:IT:hosts:test01.example.net]] | A test server, managed by XYZ corp | contact this person in case of emergency | |
#!/usr/bin/perl | |
# AJPING - pings a servlet engine with AJP protocol | |
# Sends: \x12\x34\x00\x01\x0a | |
# Expects: \0x41\0x42\0x00\0x01\0x09 | |
# | |
# taken from https://www.joedog.org/2012/06/06/ajp-functional-test/ | |
# license: Creative Commons Attribution-NonCommercial 3.0 License | |
# | |
use strict; | |
use Socket; # Part of perl |
// Atom styles.less | |
// anthonyclarka2 AT G MAIL | |
// 2018-08-03 | |
// Atom theme used is Solarized Light | |
@import "ui-variables"; | |
@import "syntax-variables"; | |
// does exactly what the package name suggests: | |
@import "packages/red-wavy-underline/styles/red-wavy-underline"; |