Skip to content

Instantly share code, notes, and snippets.

322 if (job.runs)
323 {
324 for (var i = 0; i < job.runs.length; i++)
325 {
326 logger("shitballs");
327 logger(Y.dump(job.runs));
328 // the first start time will be our job start time
329 if (!jobStart && job.runs[i].s)
330 {
331 jobStart = Math.round( job.runs[i].s * 1000 );
@nrh
nrh / gist:762903
Created January 2, 2011 22:55
patch to AnyEvent::HTTPD @ 79ca598
diff --git a/MANIFEST b/MANIFEST
index 6b03cd5..918824f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,7 +1,7 @@
Changes
MANIFEST
Makefile.PL
-README
+TODO
diff -rupN /opt/local/lib/perl5/site_perl/5.8.9/AnyEvent/HTTPD/HTTPConnection.pm ./HTTPD/HTTPConnection.pm
--- /opt/local/lib/perl5/site_perl/5.8.9/AnyEvent/HTTPD/HTTPConnection.pm 2011-01-08 14:31:26.000000000 -0600
+++ ./HTTPD/HTTPConnection.pm 2011-01-08 14:30:44.000000000 -0600
@@ -361,9 +361,9 @@ sub push_header_line {
if ($line =~ /(\S+) \040 (\S+) \040 HTTP\/(\d+)\.(\d+)/xso) {
my ($meth, $url, $vm, $vi) = ($1, $2, $3, $4);
- if (not grep { $meth eq $_ } qw/GET HEAD POST OPTIONS/) {
+ if (not grep { $meth eq $_ } qw/GET HEAD POST/) {
$self->error (501, "not implemented",
[nrh@toki ~/projects/pogo] cat .git/hooks/pre-commit
#!/usr/local/bin/perl -w
use Perl6::Slurp;
my $status = slurp '-|', 'git status';
# only want what is going to be commited
$status =~ s/Changed but not updated.*$//s;
2011-03-29 13:03:37,976 - INFO [Snapshot Thread:FileTxnSnapLog@208] - Snapshotting: e00586bff
2011-03-29 13:04:14,149 - WARN [NIOServerCxn.Factory:2181:NIOServerCnxn@518] - Exception causing close of session 0x12e9d7429400008 due to java.io.IOException: Read error
2011-03-29 13:04:14,150 - INFO [NIOServerCxn.Factory:2181:NIOServerCnxn@857] - closing session:0x12e9d7429400008 NIOServerCnxn: java.nio.channels.SocketChannel[connected local=/127.0.0.1:2181 remote=/127.0.0.1:58072]
2011-03-29 13:04:14,184 - WARN [NIOServerCxn.Factory:2181:NIOServerCnxn@518] - Exception causing close of session 0x12e9d7429400004 due to java.io.IOException: Read error
2011-03-29 13:04:14,184 - INFO [NIOServerCxn.Factory:2181:NIOServerCnxn@857] - closing session:0x12e9d7429400004 NIOServerCnxn: java.nio.channels.SocketChannel[connected local=/127.0.0.1:2181 remote=/127.0.0.1:58075]
2011-03-29 13:04:14,207 - WARN [NIOServerCxn.Factory:2181:NIOServerCnxn@518] - Exception causing close of session 0x12e9d7429400002 due to java.io.I
#!/bin/bash
for file in dot.*; do
dest=`grep '^[\"\#\/].*.file:' "$file"|awk -F'[:\ ]' '{print \$3}'`
dest=$(eval echo $dest)
lwd=${PWD#$HOME/}
if [ -r "${HOME}/${dest}" ]; then
if ! cmp -s "$file" "${HOME}/${dest}"; then
mv "${HOME}/${dest}" "${HOME}/${dest}.orig"
[nrh@toki ~] cd projects/range
[nrh@toki ~/projects/range (stdlayout)] autoreconf -if && ./configure --enable-perl --enable-mod-range && make install
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
glibtoolize: copying file `build-aux/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
glibtoolize: copying file `m4/libtool.m4'
glibtoolize: copying file `m4/ltoptions.m4'
glibtoolize: copying file `m4/ltsugar.m4'
glibtoolize: copying file `m4/ltversion.m4'
glibtoolize: copying file `m4/lt~obsolete.m4'
#!/bin/bash -x
# describe symlink destination as ["#]file: .foo, assume $HOME
for file in dot.*; do
dest=`grep '^[\"\#\/].*.file:' "$file"|gawk -F'[:[:space:]]' '{print \$3}'`
dest=$(eval echo $dest)
destdir=${dest%/*}
if [ "$destdir" != "$dest" -a ! -d "${HOME}/${destdir}" ]; then
[nrh@tinydancer ~/projects/pyrange (master)] nosetests -vxs
ok_expando_0 '[1-10]' ...
<Expando begin="1" end="10"/>
ok
ok_expando_1 '[10-1]' ...
<Expando begin="10" end="1"/>
ok
ok_expando_2 '[9999-10000]' ...
#!/bin/bash
[ "`whoami`" != "root" ] && echo "Should be run by root!" && exit 1
[ -e *.vmdk ] || ( echo Extracting VMDK image from *.ova ... ; tar xf *.ova )
[ -e github.img ] || ( echo Converting *.vmdk to raw image ... ; qemu-img convert *.vmdk github.img )
echo Preparing mounts ...
losetup -f github.img -P
vgchange -ay enterprise-11