Skip to content

Instantly share code, notes, and snippets.

View jbowes's full-sized avatar
🍀
🌙⭐️🌈❤️🧲🎈🦄

James Bowes jbowes

🍀
🌙⭐️🌈❤️🧲🎈🦄
View GitHub Profile
if (bar === baz)
{
console.log("hi bro");
bar++;
}
else
{
console.log("bye bro");
}

Keybase proof

I hereby claim:

  • I am jbowes on github.
  • I am jbowes (https://keybase.io/jbowes) on keybase.
  • I have a public key whose fingerprint is 9798 3DF6 E0F9 E7F6 3EFE 56AC 9391 0B04 F4D5 E601

To claim this, I am signing this object:

Key myKey = myRoom.getKey("zippy");
myKey.set("dooda", new SetCallback() {
public void onSet($ARGS) {
}
});
@jbowes
jbowes / gist:58089
Created February 4, 2009 13:07
A squid in CFDG
startshape squid
rule tentacle {
CIRCLE { s .5 1.2 hue 90 sat 1 b .9}
CIRCLE { s .6 1.2 b -1 z -1}
tentacle { s .9 y .3 r 3}
}
rule tentacle {
tentacle { flip 90}
" buildr (http://buildr.apache.org) filetype detection for vim
" drop this file into ~/.vim/ftdetect/
au BufRead,BufNewFile buildfile set filetype=ruby
au BufRead,BufNewFile Buildfile set filetype=ruby
#!/usr/bin/python
#
# jsondent - json indenter
#
# (C) 2010 James Bowes <jbowes@repl.ca>
#
# very complicated code!
import sys
import json
def append(self, path, certlist):
try:
cert = self.cls()
cert.read(path)
bogus = cert.bogus()
if bogus:
bogus.insert(0, _('Reason(s):'))
raise Exception('\n - '.join(bogus))
certlist.append(cert)
except Exception, e:
@jbowes
jbowes / randimage.py
Created April 26, 2011 14:31
grab a random image. hook it up to your irc client for good times!
#
# Here's my alias:
# trout = "me slaps $0 around a bit with a large trout";
# image = "exec -out python ~/randimage.py \"$-\"";
# "image-arg" = "exec -out python ~/randimage.py -showargs \"$-\"";
import sys
import urllib
import simplejson
import random
/**
* Copyright (c) 2011 Red Hat, Inc.
*
* This software is licensed to you under the GNU General Public License,
* version 2 (GPLv2). There is NO WARRANTY for this software, express or
* implied, including the implied warranties of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
* along with this software; if not, see
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
*
/**
* Copyright (c) 2011 Red Hat, Inc.
*
* This software is licensed to you under the GNU General Public License,
* version 2 (GPLv2). There is NO WARRANTY for this software, express or
* implied, including the implied warranties of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
* along with this software; if not, see
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
*