Skip to content

Instantly share code, notes, and snippets.

View chizmw's full-sized avatar

Chisel Malik-Wright chizmw

View GitHub Profile

The World Cup Graph

Initial Data Setup

@chizmw
chizmw / neo4lul
Last active August 29, 2015 14:03
LUL
= LUL
:author: Chisel Wright
:twitter: @chizcw
Some intro will go here
Data mostly from: http://en.wikipedia.org/wiki/List_of_London_Underground_stations#Stations
vim search/replace:
* s!^\([a-z]\+\) \(.\+\)$!CREATE (\1:Station { name:"\2" } )!
@chizmw
chizmw / mac-adduser
Last active August 29, 2015 14:24
mac-adduser
#!/bin/bash
# username needs to be specified
if [ -z "$1" ]; then
echo "usage: $(basename $0) username";
exit;
fi
username=$1;
# we need to be running as root
@chizmw
chizmw / star-realms.adoc
Created July 2, 2015 14:29
Star Realms : Counting The Cards

Star Realms : Counting The Cards

Create the Base Set

CREATE  (sr:Game  { name:'Star Realms' }),
@chizmw
chizmw / test_err.t
Created September 17, 2011 20:41
test_err() experimentation
use Test::More;
use strict;
use warnings;
use Test::Builder::Tester;
test_out("not ok 1 - foo");
test_fail(+1);
fail("foo");
test_test("fail works");
@chizmw
chizmw / cmd_availability.pl
Created September 21, 2011 09:32
irssi plugin to munge nick and away message, preserving base nick
#!/usr/bin/env perl
# Usage: /AVAILABILITY [here|lunch|meeting]
sub cmd_availability {
# data - contains the parameters for /HELLO
# server - the active server in window
# witem - the active window item (eg. channel, query)
# or undef if the window is empty
my ($data, $server, $witem) = @_;
@chizmw
chizmw / cmd_availability.pl
Created July 24, 2012 11:06
irssi 'availability' plugin script
#!/usr/bin/env perl
# Usage: /AVAILABILITY [here|lunch|meeting]
sub cmd_availability {
# data - contains the parameters for /HELLO
# server - the active server in window
# witem - the active window item (eg. channel, query)
# or undef if the window is empty
my ($data, $server, $witem) = @_;
@chizmw
chizmw / .gitignore
Created August 13, 2012 19:54
MooseX::Types::Structured validation example
*.sw?
@chizmw
chizmw / odd_behaviour.t
Created August 16, 2012 13:39
Strange type checking behaviour
package My::Class;
use strict;
use warnings;
use Moose;
use MooseX::AttributeHelpers;
use MooseX::Types::Moose qw/ArrayRef Int/;
use MooseX::Types -declare => [qw(Thingy ThingyList)];
subtype Thingy,
@chizmw
chizmw / cmd_availability.pl
Last active December 10, 2015 23:28
An irssi plugin that makes it easier to change your nick and away status to make your availability really obvious (used at $work)
#!/usr/bin/env perl
# An irssi plugin that makes it easier to change your nick and away status to
# make your availability really obvious (used at $work)
#
# Simple examples are:
# gone --> gone = "/availability gone";
# idme = "/msg NickServ IDENTIFY s3kritw0rd";
# here --> here = "/availability here; /idme";