Skip to content

Instantly share code, notes, and snippets.

View jamiew's full-sized avatar

Jamie Dubs jamiew

View GitHub Profile
[branch]
autosetuprebase = always
autosetupmerge = true
<form action="http://000000book.com/data?redirect=1" method="post">
<fieldset id="share">
<legend>Share on 000000book.com</legend>
<input type="hidden" name="gml" id="gml" value="">
<input type="hidden" name="application" value="Coding With Attitude GML Drawer: MFF2010 Edition">
<!--
<label for="share-author">Your name</label>
@jamiew
jamiew / sup.sh
Created July 13, 2010 17:45
shell script to update from various SCMs
## subversion
if [ -e ".svn" ]; then
svn up
## cvs
elif [ -e "CVS" ]; then
cvs up -dP
## darcs
elif [ -e "_darcs" ]; then
darcs pull --all
## svk
# rewrites history!
# finish using 'git push --force origin master'
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "Jamie Wilkinson" ]; then
GIT_COMMITTER_NAME="Jamie Wilkinson";
GIT_AUTHOR_NAME="Jamie Wilkinson";
GIT_COMMITTER_EMAIL="[email protected]";
GIT_AUTHOR_EMAIL="[email protected]";
git commit-tree "$@";
@jamiew
jamiew / gist:371619
Created April 19, 2010 20:59 — forked from atmos/gist:227332
Spec for enforcing whitespace
require File.dirname(__FILE__) + '/spec_helper'
describe "The library itself" do
Spec::Matchers.define :have_no_tab_characters do
match do |filename|
@failing_lines = []
File.readlines(filename).each_with_index do |line,number|
@failing_lines << number + 1 if line =~ /\t/
end
@failing_lines.empty?
<?php
// Add some dope ASCII art to yr blog, dynamically generated via `figlet`
//
// I'm using some cool custom figlet fonts you may or may not have -- check 'showfigfonts`
// Toss this into your theme's index.php and/or archive.php
// Also, you'll want to cache this -- try WPSuperCache
// --jdubs <http://jamiedubs.com> | FAT <http://fffff.at>
if(is_category() || is_tag()) {
print '<div class="ascii-art"><pre>'."\n";
Was receiving a weird exception in the Integration Console while adding Google Checkout secure notification callbacks to our app:
Error:
javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
Solution:
We were only allowing SSLv3 in our nginx ssl_protocols configuration. Changing it to "SSLv3 SSLv2 TLSv1" (the default) fixed it!
# checking out your repo (as the 'origin' remote), then adding the other dude's repo as a remote
[jamie@jproof ~]$ git clone git://github.com/slambert/WPFolio.git wpfolio
[jamie@jproof ~]$ cd wpfolio
[jamie@jproof ~/wpfolio(master)]$ git status
# On branch master
nothing to commit (working directory clean)
[jamie@jproof ~/wpfolio(master)]$ git remote add danielwiener git://github.com/danielwiener/WPFolio.git
[jamie@jproof ~/wpfolio(master)]$ git fetch danielwiener
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
## fancy prompt showing git branch
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
parse_svn_revision() {
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //')
[ "$REV" ] || return
[ "$(svn st)" ] && DIRTY=' *'
# Ubuntu 9.04 (jaunty) comes with an old ruby that has broken REXML
# and the Ubuntu Ruby PPA doesn't do jaunty (??!)
wget http://archive.ubuntu.com/ubuntu/pool/main/r/ruby1.8/libruby1.8_1.8.7.249-1ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/r/ruby1.8/ruby1.8-dev_1.8.7.249-1ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/r/ruby1.8/ruby1.8_1.8.7.249-1ubuntu1_amd64.deb
sudo dpkg -i libruby1.8_1.8.7.249-1ubuntu1_amd64.deb ruby1.8_1.8.7.249-1ubuntu1_amd64.deb ruby1.8-dev_1.8.7.249-1ubuntu1_amd64.deb
sudo apt-get install ruby