Skip to content

Instantly share code, notes, and snippets.

View thepatrick's full-sized avatar
🌈
Hi

Patrick Quinn-Graham thepatrick

🌈
Hi
View GitHub Profile
javascript:a=document.getElementsByTagName('input');for(i=0;i<a.length;i++){if(a[i].type=="checkbox"){%20a[i].checked%20=%20true;%20}};SetCmd(document.msgViewer.CmdDelete.value);
-(IBAction)magic:(id)sender {
NSError *err = nil;
NSLog(@"Loading nothing movie...");
NSURL *nothing = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"nothing" ofType:@"mov"]];
QTMovie *mMovie = [QTMovie movieWithURL:nothing error:&err];
if(err != nil) {
NSLog(@"Failed to create qtmovie: %@", err);
return;
#!/bin/bash
# Your original postgres is assumed to be running on the local machine
# on $OLD_PORT. You may wish to modify --encoding.
DB_NAME=live
OLD_PORT=5432
DUMP_OPTIONS="--no-owner --encoding=latin1"
# This is the configuration of your new postgres. Version is purely
# used to autopopulate the NEW_PG variable and some status messages.
#!/usr/bin/env ruby
require 'rubygems'
require 'getoptlong'
require 'open-uri'
require 'json'
require 'net/http'
require 'uri'
# You can either use this, or
# provides a ridiculously simple SSL VPN, using a client side certificate.
# Issuing client side certificates is easy, and there are plenty of
# demos already.
#
# The following files are assumed:
# ca.crt This is your root certificate (note: NOT the key!)
# apache.crt An SSL certificate for this webserver
# apache.key The SSL key (to go with the SSL certificate)
# ca.crl The revocation list from your CA (so you can disable access!)
#
@thepatrick
thepatrick / nb6plus4.rb
Created October 24, 2010 11:40
Netcomm NB6Plus4 Stats Extractor
# NB6Plus4 Stats Extractor
# Copyright (c) 2010 Patrick Quinn-Graham
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
@thepatrick
thepatrick / com.pftqg.chromeupdate.plist
Created December 10, 2010 05:01
A script to update Chromium to the latest nightly build. Runs well from a launchd job.
<?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.pftqg.chromeupdate</string>
<key>ProgramArguments</key>
<array>
<string>/Users/patrick/bin/update-chrome.sh</string>
</array>
@thepatrick
thepatrick / gist:768890
Created January 7, 2011 00:10
Secret twitter for mac prefs (found on a blog somewhere)
defaults write com.twitter.twitter-mac ScrollingMakesKeyAndOrdersFront -bool true
defaults write com.twitter.twitter-mac UserTimelineDerepeater -bool true
defaults write com.twitter.twitter-mac TypeAnywhereToTweet -bool true
defaults write com.twitter.twitter-mac HideInBackground -bool true
defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true
defaults write com.twitter.twitter-mac NormalComposeWindowLevel -bool true
We couldn’t find that file to show.
loadmodule "/home/patrick/SourceCache/Unreal3.2/src/modules/commands.so";
loadmodule "/home/patrick/SourceCache/Unreal3.2/src/modules/cloak.so";
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
me
{
name "irc.m.ac.nz";
info "M.ac.nz IRC Server";