This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# | |
require 'bencode' | |
# print the list of files which are in a given directory, but not currently seeding in rtorrent | |
# | |
# This script answers the question / problem: | |
# "I have a ton of stuff downloading in rtorrent, and it's all going | |
# into one directory. What stuff from that directory can be safely |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# simplify gnupod_addsong.pl syntax | |
# | |
# point it at a directory to add all .mp3 and .flac recursively | |
# - encodes flac to V0 (-x mp3 -e 0 flag) | |
if [ $# -eq 0 ]; then | |
echo "$0 <dir>" | |
exit -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bus 002 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver | |
Device Descriptor: | |
bLength 18 | |
bDescriptorType 1 | |
bcdUSB 2.00 | |
bDeviceClass 0 (Defined at Interface level) | |
bDeviceSubClass 0 | |
bDeviceProtocol 0 | |
bMaxPacketSize0 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# simplify gnupod_addsong.pl syntax | |
# | |
# point it at a directory to add all .mp3 recursively | |
if [ $# -eq 0 ]; then | |
echo "$0 <dir>" | |
exit -1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /etc/ssh/sshrc | |
# watchfile | |
ip=$(echo $SSH_CONNECTION | awk '{print $1}') | |
reverse=$(dig -x $ip +short) | |
echo $(date) | mutt -s "ssh login: $USER@$HOSTNAME from $reverse ($ip)" noahktilton@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
while [[ $# -gt 0 ]]; do | |
filename=$(basename $1) | |
new_filename='' | |
year=$(echo $filename | sed -n -e 's/.*\([0-9]\{4\}\).*/\1/p') | |
if [[ ! -z $year ]]; then | |
new_filename=$year |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\usepackage{fullpage} | |
\usepackage{fontspec} | |
\setromanfont{Liberation Serif} | |
\begin{document} | |
hello world | |
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
SESSION_DIR = '/path/to/.sessions' | |
# ^ should match session_path from .rtorrent.rc | |
MV_DIR = '/downloads/complete/tracker1.com' | |
# ^ Change this to path these files should have been moved to | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
directory = /download/queue | |
. . . | |
schedule = watch_directory_1,5,5,"load_start=/download/torrents/tracker1.com/*.torrent,d.set_custom1=/download/tracker1.com/" | |
schedule = watch_directory_2,5,5,"load_start=/download/torrents/tracker2.com/*.torrent,d.set_custom1=/download/tracker2.com/" | |
system.method.set_key =event.download.finished,move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1=" | |
. . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tmux for non-root user | |
wget 'http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.2/tmux-1.2.tar.gz?use_mirror=cdnetworks-us-1' | |
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz | |
tar zxvf libevent-1.4.13-stable.tar.gz | |
tar zxvf tmux-1.2.tar.gz | |
cd libevent-1.4.13-stable | |
./configure --prefix=~/opt/libevent-1.4.13-stable | |
make -j 5 | |
make install |