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
@saranrapjs
saranrapjs / varnish_test_cached.js
Last active August 29, 2015 13:57
PhantomJS script for deducing included resources using headless webkit, and determining which of them have been successfully cached by Varnish!
var system = require('system'),
fs = require("fs"),
CACHED_HEADER_NAME_REGEX = /X-Cache/,
CACHED_HEADER_VALUE_REGEX = /HIT/,
address,
parsedAddress,
cachedBytes = 0,
nocacheBytes= 0,
showAllURLS = false,
quiet = false,
@jart
jart / mtgox.php
Created March 12, 2014 16:05
Some Mt.Gox Source Code
<?php
namespace Money;
class Bitcoin {
#const BITCOIN_NODE = '173.224.125.222'; // w001.mo.us temporary
const BITCOIN_NODE = '50.97.137.37';
static private $pending = array();
public static function update() {
@despens
despens / blink_is_back.css
Created August 8, 2014 20:10
Blink tags are back, thanks to @thxlt
@mattdennewitz
mattdennewitz / dark.el
Created October 1, 2014 17:16
Emacs themes
(defun cubshat ()
(interactive)
(color-theme-install
'(cubshat
((background-color . "#222222")
(background-mode . light)
(border-color . "#222222")
(cursor-color . "#999999")
(foreground-color . "#e5dcdc")
(mouse-color . "black"))
@mattstevens
mattstevens / com.alloysoft.DroboKeepAlive.plist
Created November 2, 2009 04:38
Launch agent to prevent Drobo spin down on OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.alloysoft.DroboKeepAlive</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/touch</string>
<string>/Volumes/Drobo/.keepalive</string>
@abraham
abraham / access_token.js
Created August 20, 2010 08:53
OAuth 2 with the Twitter API
localStorage.getItem("twttr_anywhere");
// "9436992-QKOV6cNsfeRe9Kagyy4AmQF7WX2efs3rRDgyEy7Bvsfeaf"
@ticean
ticean / knife.rb
Created October 21, 2011 07:25 — forked from fnichol/knife.rb
My Generic knife.rb
### Chef Solo
#
#
### Opscode Hosted Chef Server
#
# export KNIFE_USER="jdoe"
# export KNIFE_ORGNAME="acmeco"
#
# * Your Opscode client key should be at `~/.chef.d/opscode-jdoe.pem`.
# * Your Opscode validation key should be at `~/.chef.d/opscode-acmeco-validator.pem`.
@rubysolo
rubysolo / gist:2430067
Created April 20, 2012 16:16 — forked from marcel/gist:2100703
giftube – Generates an animated gif from a YouTube url.
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
#!/usr/bin/env perl
use utf8;
binmode STDOUT, ":utf8";
while (<>) {
tr/A-Za-z/𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅𝖆𝖇𝖈𝖉𝖊𝖋𝖌𝖍𝖎𝖏𝖐𝖑𝖒𝖓𝖔𝖕𝖖𝖗𝖘𝖙𝖚𝖛𝖜𝖝𝖞𝖟/;
print;
}
@bsdf
bsdf / gist:3686369
Created September 9, 2012 18:44
tblq
#!/usr/bin/env perl
use strict;
use warnings;
use WWW::Tumblr;
die 'u need to specify some filesz' if not @ARGV;
my $t = WWW::Tumblr->new(