Skip to content

Instantly share code, notes, and snippets.

View wizardishungry's full-sized avatar
🐫
Copyright 1987-2013, Larry Wall

Jon Williams wizardishungry

🐫
Copyright 1987-2013, Larry Wall
View GitHub Profile
@wizardishungry
wizardishungry / .bashrc
Created December 19, 2010 23:36
basic screenrc and corresponding entries from bashrc to make it work nice
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
export PS1='\[\033k\033\\\]\! \h:\w\$ '
# only use __git_ps1 if the function is defined
type __git_ps1 2> /dev/null|grep func > /dev/null
if [ $? -eq 0 ]; then
export PS1='\[\033k\033\\\]\! \h:\w$(__git_ps1)\$ '
fi
@wizardishungry
wizardishungry / pinboard-backup.sh
Created December 16, 2010 23:08
example cron script to pull pinboard.in XML export into git for data portability. (Don't run this too often; be nice to the API!)
#!/bin/sh
user='WIZARDISHUNGRY'
password='doyoureallythinkidputmypasswordhere'
path=~/.skel/pinboard.xml
cd `dirname $path`
curl -fsS --user $user:$password -o $path 'https://api.pinboard.in/v1/posts/all'
git add $path
git commit -m 'automated pinboard backup' > /dev/null
@wizardishungry
wizardishungry / crontab
Created December 14, 2010 01:48
useful things
@reboot ssh lab.wizardishungry.com -L 6667:irc.freenode.net:6667 cat
#!/usr/bin/perl
#
# googleapps-dns.pl
#
# Script to populate the Linode's DNS Manager for Google Apps.
#
# Copyright (c) 2008 Patrick Hennessy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@wizardishungry
wizardishungry / selected-packages-for-server.sh
Created December 13, 2010 19:45
for a typical debian/ubuntu install… generated from my SunBlade's debian install
apt-get install adduser aptitude aspell-en bash bc bind9-host binutils bsdmainutils bsdutils bzip2 cpio curl cvs cvsps dash deborphan dialog dictionaries-common diffutils dnsutils docbook-xml file-roller findutils finger ftp ftplib3 fuse-utils gawk gcc geoclue geoclue-hostip geoclue-localnet geoclue-manual geoclue-yahoo geoip-database gettext gettext-base git git-annex git-arch git-core git-cvs git-svn gnupg gnupg-curl gzip html2text imagemagick install-info iproute iptables iputils-ping irb1.8 iso-codes less locate lockfile-progs lsof lynx lzma mailx make man-db manpages manpages-dev mtools myspell-en-us mysql-client mysql-client-5.1 mysql-common ncurses-base ncurses-bin net-tools netcat-traditional openssh-blacklist-extra openssh-client openssh-server openssl openssl-blacklist patch perl php5 php5-cli php5-common php5-curl php5-mysql php5-suhosin policykit-1 popoppler-utils procps psmisc python python2.6 rarian-compat readline-common reportbug ri ri1.8 rsync ruby ruby-elisp ruby-full ruby1.8 ruby1.8-dev rub
@wizardishungry
wizardishungry / meatball.estimate
Last active September 24, 2015 10:07
estimate number of meatballs remaining in freezer
initial estimate: 234
current: 0
@wizardishungry
wizardishungry / git-annex-recipes.sh
Created November 11, 2010 03:43
useful recipes for git-annex :)
find * -iname \*.mp4 -o -iname \*.mov -o -iname \*.m4v -o -iname \*.mpg -exec git annex add {} \;
@wizardishungry
wizardishungry / git-annex_install_notes.txt
Created November 11, 2010 00:46
Notes for setting up git-annex (http://git-annex.branchable.com/) on MacOS X 10.6 w/ MacPorts
sudo port install haskell-platform git-core ossp-uuid md5sha1sum
[waits forever…]
[finished]
[realizes missingh isn't working in MacPorts]
sudo cabal update
sudo cabal install missingh
sudo cabal install utf8-string
@wizardishungry
wizardishungry / download.pl
Created November 4, 2010 21:56
Script to clean up my download directory. Move all {mp3,m4a} and subdirs with said filenames to a datestamped directory and then reveal in the Finder.
#!/usr/bin/perl
use POSIX qw/strftime/;
use File::Find ();
use File::Copy;
use vars qw/*name *dir *prune/;
*name = *File::Find::name;
*dir = *File::Find::dir;
*prune = *File::Find::prune;
ffmpeg -i ~/Desktop/diazeugma_final_jw_edit.mov -s 480x234 -vcodec mpeg4 -sameq -acodec libmp3lame -ab 128k ~/Desktop/diazeugma_final_jw_edit.avi