Skip to content

Instantly share code, notes, and snippets.

View samv's full-sized avatar

Sam Vilain samv

View GitHub Profile
Script started on Tue 24 Mar 2009 16:20:55 NZDT
];samv@wilber:~/tmpwilber:~/tmp$
];samv@wilber:~/tmpwilber:~/tmp$
];samv@wilber:~/tmpwilber:~/tmp$ m
];samv@wilber:~/tmpwilber:~/tmp$
];samv@wilber:~/tmpwilber:~/tmp$ m
];samv@wilber:~/tmpwilber:~/tmp$
];samv@wilber:~/tmpwilber:~/tmp$ mk
];samv@wilber:~/tmpwilber:~/tmp$
];samv@wilber:~/tmpwilber:~/tmp$ mk
DB<7> p $_
color.branch=auto
DB<8> x split $_, "=", 2
0 '='
DB<9>
____________________________________
/ _ _ \
| _____ _____ _____ (_) | | Git version 1.6.4.3
| |_____|_____|_____| __ _ _| |_ | Copyright (c) 2005-2009
| _ _ _ / _` | | __| | various authors, all rights
| _| |_ _| |_ _| |_ | (_| | | |_ | reserved.
| |_ _|_ _|_ _| \__, |_|\__| |
| |_| |_| |_| __/ | | Checking for new git releases
| |___/ | on kernel.org
\____________________________________/
@samv
samv / slices.go
Created January 27, 2011 05:17
slices example
package main
import "tour/pic"
func Pic(dx, dy int) [][]uint8 {
var rv = make([][]uint8, dy)
for y := 0; y < dy; y++ {
rv[y] = make([]uint8, dx);
for x := 0; x < dx; x++ {
@samv
samv / eyoung.eml
Created February 7, 2011 22:29
Latest from Count Erik J. Young III
Received: from 178.103.20.196 by rms-eu004.v300.gmx.net with HTTP
Date: Mon, 07 Feb 2011 21:54:15 +0000
From: "Erik Young" <3745@gmx.com>
Subject: Protocol Protocol Protocol
To: xp-droi@europarl.europa.eu,zhaimei@chinadaily.com.cn,zhxinyan@chinadaily.com.cn,zoe@endclub.com,zedenka.rakocevic@cb-cg.org,wakeel@da.gov.kw,wdsmp.press@disney.co.uk,webteam@howardmarks.co.uk,webmaster@mod.go.th,woking@waterfalls.co.uk,werner.wenning.ww@bayer-ag.de,webmaster@stlucia.gov.lc,webmaster@uh.cu,webmaster@virginradio.fr,westminster_office@mingcampbell.org.uk,westbyfleet@waterfalls.co.uk,v.farmer@xtra.co.nz,valeria.m.cafe@jpmchase.com,visaenquiries.bangkok@fco.gov.uk,vuk.vujnovic@gov.me,uzkoremb@koremb.uz,ufficio.dipartimentodipolizia@pa.sm,ukbapublicenquiries@ukba.gsi.gov.uk,unisbkk.unescap@un.org,ufficioculturale.bangkok@esteri.it,tarja.kangaskorte@formin.fi,thai.bern@thenet.ch,tony.pieri@legalcomplaints.org.uk,trade.kualalumpur@fco.gov.uk,treaties@mfa.go.th,tzl@dvb.no,sar@mod.gov.il,sar@moag.gov.il,sam.vilain@catalyst.net.
@samv
samv / contact-freelpg.txt
Created February 25, 2011 20:36
List of free LPG stations via Contact Energy
DONE Challenge - 45 Halswell Road, Halswell
DONE Challenge - corner Milton and Selwyn Street, Christchurch
DONE Challenge Waimak - Main North Road, Kaiapoi
DONE Caltex - Blenheim Road, Riccarton
DONE Caltex - Lincoln Road, Addington
@samv
samv / by-dels.pl
Created March 9, 2011 02:06
changes that net added/removed the most total lines from 2009-01-01 to 2009-09-30
#!/usr/bin/perl -nl
push @$a, $_ unless !@$a and !m{\S};
m{(\d+) insertions.*? (\d+) deletions}
&& do { push @{$x{$2-$1}},$a; $a=[] };
END {
@by_dels = sort {$a<=>$b} keys %x;
my $h2 = sub { print "$_[0]"; print "-" x length($_[0]); print "\n"; };
@samv
samv / refcounter.man
Created July 6, 2011 03:04
threads::tbb::refcounter proposed API
NAME
threads::tbb::refcounter - inside-out refcounts for XS types
SYNOPSIS
use threads::tbb::refcounter qw(Image::Magick);
DESCRIPTION
This module allows XS modules which were not written with
"threads::tbb" in mind (but are thread-safe) to be explicitly marked as
passable between threads, without requiring the XS type to explicitly
@samv
samv / e-mail 1
Created August 11, 2011 20:47
Flagged as spam. Actually ham. But it's no wonder that spamassassin had problems.
From: us.embassy@response-uk.co.uk
Subject: Notification of Credit Card Activity
To: sam@vilain.net
*** WARNING: THIS E-MAIL SERVES ONLY AS NOTIFICATION OF CREDIT CARD
ACTIVITY. THIS IS NOT AN APPOINTMENT LETTER OR A MACHINE READABLE VISA
RECEIPT ***
*** IF YOU APPEAR AT THE U.S. EMBASSY WITH ONLY THIS E-MAIL, YOU WILL BE
@samv
samv / keymap.txt
Created September 9, 2011 23:01
Apple Keymap
Note: quite a few of the marks available via option+key are combining diacritics; eg option+u, u => ü
~ ⁄! €@ ‹# ›$ fi% fl^ ‡& °* ·( ‚) —_ ±+
`` ¡1 ™2 £3 ¢4 ∞5 §6 ¶7 •8 ª9 º0 –- ≠=
ŒQ „W ´E ‰R ˇT ÁY ¨U ˆI ØO ∏P ”{ ’} »|
œq ∑w ´e ®r †t ¥y ¨u ˆi øo πp “[ ‘] «\
ÅA ÍS ÎD ÏF ˝G ÓH ÔJ K ÒL Ú: Æ"
åa ßs ∂d ƒf ©g ˙h ∆j ˚k ¬l …; æ'