Skip to content

Instantly share code, notes, and snippets.

View lanrat's full-sized avatar
😎
👨‍💻

Ian Foster lanrat

😎
👨‍💻
View GitHub Profile
@lanrat
lanrat / 256color.pl
Created January 26, 2015 19:37
256 color term tester
#!/usr/bin/perl
# Author: Todd Larason <[email protected]>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
@lanrat
lanrat / awmtt.sh
Created January 26, 2015 19:38
run awesome in a nested window for testing
#!/usr/bin/env bash
# awmtt: awesomewm testing tool
#{{{ Usage
usage() {
cat <<EOF
awmtt [ start | stop | restart | -h | -e | -t [ get | change | list | random ] ] [ -C /path/to/rc.lua ] [ -D display ] [ -S windowsize ]
start Spawn nested Awesome via Xephyr
stop Stops Xephyr
@lanrat
lanrat / colors.sh
Created January 26, 2015 19:39
print common shell colors
#!/usr/bin/env bash
#this function was taken from:
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt#Colors_overview
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
@lanrat
lanrat / wmtt.sh
Created January 26, 2015 19:42
run nested window-manager
#!/usr/bin/env bash
# wmtt: wm testing tool
# built from the awmtt script
#Default Variables
#TODO make this arg passable
WM="openbox-session"
ME=$(basename ${0})
# Display and window size
D=1
@lanrat
lanrat / rtorrent.rc
Created February 16, 2015 04:08
rtorrent configuration
# Maximum and minimum number of peers to connect to per torrent.
min_peers = 40
max_peers = 64
# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 1
max_peers_seed = 1
# Maximum number of simultanious uploads per torrent.
max_uploads = 10
@lanrat
lanrat / ns.sh
Created March 11, 2015 02:53
netstat in bash with proc
#! /bin/bash
#get all data
ROUTE=$(cat /proc/net/route | grep -v "Iface")
TCP=$(cat /proc/net/tcp | grep "[0-9]: ")
UDP=$(cat /proc/net/udp | grep "[0-9]: ")
SOCKETS=$(ls -l $(find /proc/*/fd/ -type l 2>/dev/null) 2>/dev/null | grep socket)
parse_ipv4()
@lanrat
lanrat / motd.sh
Last active August 29, 2015 14:19
Colord Figlet Hostname
h=$(hostname|figlet);c=$(($(hostname|wc -c)%6+1));echo "\033[3${c}m${h}\033[0m"
@lanrat
lanrat / HP-Designjet-T1100ps-44in.ppd
Created May 9, 2015 02:33
HP Designjet T1100ps 44in Driver
*PPD-Adobe: "4.3"
*% =================================
*% Copyright 1992-2007 Hewlett-Packard Company
*% Permission is hereby granted, free of charge, to any person obtaining
*% a copy of this software and associated documentation files (the
*% "Software"), to deal in the Software without restriction, including
*% without limitation the rights to use, copy, modify, merge, publish,
*% distribute, sublicense, and/or sell copies of the Software, and to
*% permit persons to whom the Software is furnished to do so, subject to
*% the following conditions:

Keybase proof

I hereby claim:

  • I am lanrat on github.
  • I am lanrat (https://keybase.io/lanrat) on keybase.
  • I have a public key whose fingerprint is 880F C00E F63A 7ABD 7569 0451 8124 D5BF 8D18 43C2

To claim this, I am signing this object:

@lanrat
lanrat / ascii.txt
Last active October 3, 2015 22:14
Tiamat’s Eye
firsttolocatethehouseofbearjesterwinsafreec3ticket