Skip to content

Instantly share code, notes, and snippets.

View bdotdub's full-sized avatar

Benny Wong bdotdub

View GitHub Profile
while true
contents = `curl http://developer.apple.com/devcenter/ios/index.action`.strip
if contents !~ /tryagainsoon/
`twurl -d "status=[autotweet] iOS dev center back up" /1/statuses/update.xml`
`say yay`
exit 0
end
sleep 15
end
#!/usr/bin/env ruby
stdin_tokens = STDIN.read.split(' ')
log_diffs = `git log --stat #{stdin_tokens[0]}..#{stdin_tokens[1]}`
if log_diffs =~ / db\/migrate\//
puts " ----------------------------------------"
puts " < YOU WILL HAVE TO RUN `rake db:migrate` >"
puts " ----------------------------------------"
puts " \\ ,__,"
#import <Foundation/Foundation.h>
#import <CoreServices/CoreServices.h>
// adjective
// 1 imaginative or fanciful; remote from reality
// 2 extraordinarily good or attractive
// DERIVATIVES
// fantastical adjective (in sense 1) .
// fantasticality noun (in sense 1) .
// fantastically adverb
@bdotdub
bdotdub / redis.markdown
Created November 24, 2010 22:18
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

input = `cat event.ics`
inside_event = false
current_key = nil
vevents = []
vevent = nil
input.split("\n").each do |line|
if line =~ /^BEGIN:VEVENT/
#!/opt/local/bin/ruby
require 'yaml'
require 'net/http'
require 'rubygems'
require 'json'
####################################################################
#
# Broken Build Git Hook
//
// BlobAppDelegate.m
// Blob
//
// Created by Benny Wong on 10/10/10.
// Copyright 2010 Seedless Media. All rights reserved.
//
#import "BlobAppDelegate.h"
#import "git/odb.h"
#include <iostream>
using namespace std;
typedef void _;
_ _____(char *_) { cout << _ << endl; }
_ ____() { _____("third"); }
_ *___(_ (*______)()) {
_____("second");
return (_ *)______;
}
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, make this file executable.
# This is slightly modified from Andrew Morton's Perfect Patch.