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
Section "Device"
Identifier "Default Device"
Option "NoLogo" "True"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
@wizardishungry
wizardishungry / alliterative.perlbutreally.sh
Created September 11, 2011 20:36
alliterative friends network
perl -npe '$_=lc;($f,$m,$l) = split(/ /); ($f)=split(//,$f); ($m)=split(//,$m); ($l)=split(//,$l); if($f eq $m || $f eq $l){} else { $_=""; }' < friends.txt
;
; CYOA 12 (1982)
; Inside UFO 54-40
; by Edward Packard
;
; Each node is a page in the book, with
; the lines between them representing
; choices. The first page is drawn in
; black and marked with a dot.
;
@wizardishungry
wizardishungry / the-worst.sh
Created June 13, 2011 17:46
Shell expression for finding functions inside a (non-OO) php file and grepping for their names
grep 'function\W\w*\W*(' foo.php | cut -d \( -f 1 | grep -v // | sed 's/^\W*//' | cut -d ' ' -f 2- | sed 's/.*/echo -n &: \&\& egrep -r "&.?[(]" ..\/* | grep -v -- \"->&\" | grep -v ..\/functions\/ | wc -l /' | sh
@wizardishungry
wizardishungry / ubuntu-is-horrible.sh
Created May 24, 2011 14:03
stuff i won't lose if i move between ubuntu boxen
xrandr --output LVDS1 --mode 1280x800 --left-of VGA1
@wizardishungry
wizardishungry / gist:959421
Created May 6, 2011 17:48
Your goose is cooked. (Your current chick is burned up too!)
Try the Moo Shu Pork. It is especially good today. % Try to get all of your posthumous medals in advance. % Try to have as good a life as you can under the circumstances. % Try to relax and enjoy the crisis. -- Ashleigh Brilliant % Try to value useful qualities in one who loves you. % Tuesday After Lunch is the cosmic time of the week. % Tuesday is the Wednesday of the rest of your life. % What happened last night can happen again. % While you recently had your problems on the run, they've regrouped and are making another attack. % Write yourself a threatening letter and pen a defiant reply. % You are a bundle of energy, always on the go. % You are a fluke of the universe; you have no right to be here. % You are a very redundant person, that's what kind of person you are. % You are always busy. % You are as I am with You. % You are capable of planning your future. % You are confused; but this is your normal state. % You are deeply attached to your friends and acquaintances. % You are destined to become the co
@wizardishungry
wizardishungry / selenium-harness-local.pl
Created April 26, 2011 17:48
Script to launch selenium server locally and run a test harness
#!/bin/bash
java -jar jars/selenium-server.jar -trustAllSSLCertificates &
ME=$!
CODE=1
until [ "$CODE" -eq "0" ]; do
sleep 0.25
nc -z localhost 4444
CODE=$?
done
./harness.pl -h localhost -p 4444 -t httphost.example.com
@wizardishungry
wizardishungry / Xvfb
Created February 16, 2011 21:51
getting phantomjs working on Debian 5
#! /bin/sh
### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop:
### END INIT INFO
@wizardishungry
wizardishungry / getting-phantomjs-working-on-centos55.txt
Created February 9, 2011 19:53
getting phantomjs working on CentOS 5.5
repo for a more modern version of qt (4.7)
http://atrpms.net/documentation/install/
http://packages.atrpms.net/dist/el5/qt4/
cat /etc/yum.repos.d/atrpms.repo
[atrpms]
name=ATrpms manual
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing/
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
# check for php syntax errors in changed files
git status|grep php| cut -d : -f 2 | xargs -n1 php -l