Skip to content

Instantly share code, notes, and snippets.

View brock's full-sized avatar
😎

Brock Angelo brock

😎
View GitHub Profile
@kusor
kusor / .gitmodules
Created May 16, 2010 08:20
NodeJS AMQP Exchanges
[submodule "amqp"]
path = amqp
url = http://github.com/ry/node-amqp.git
@swieton
swieton / vhost_tests.rb
Created November 7, 2010 19:00
Simple validation of redirects and URL rewrites
require 'rubygems'
require 'http-access2' # from gem httpclient
tests = {
# A simple test: GET a URL and expect a successful response
"Home page" => {
:get => "http://www.myapp.com/",
:result => 200
},
@protocool
protocool / caveatPatchor.js
Created February 11, 2011 01:00
Sample Propane caveatPatchor.js file
/**
Sample Propane caveatPatchor.js file based on tmm1's avatar hack.
You'll need at least version 1.1.1 to experiment with this:
http://propaneapp.com/appcast/Propane.1.1.1.zip
Once I'm sure exposing this hack-injection point doesn't cause problems
I'll do an official auto-updating version.
As of version 1.1.1, Propane will load and execute the contents of
@protocool
protocool / caveatPatchor.js
Created February 14, 2011 02:29
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@urschrei
urschrei / excel_things.py
Created May 7, 2011 12:41
Open CSV or Excel files, return the contents as a list of lists, write out to Excel file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
excel_things.py
Created by Stephan Hügel on 2011-05-07
Read XLS or CSV files, and return contents as unicode strings in nested lists
One row per list item, one column per nested list item:
[[u'foo', u'bar'], [u'baz', u'abc123'], … ]
@mvriel
mvriel / pre-commit.php
Created May 16, 2011 20:14
Pre-commit hook for DocBlox
#!/usr/bin/php
<?php
echo PHP_EOL;
// output a little introduction
echo '>> Starting unit tests' . PHP_EOL;
// get the name for this project; probably the topmost folder name
$projectName = basename(getcwd());
@paulirish
paulirish / 0readme.md
Created August 22, 2011 05:26
For converting adium logs to decently sexy HTML

adium log export to HTML

this shit is for exporting this weirdass xml out into some sane HTML.

  • run rename.sh to kill the whitespaces in your xml filenames
    • alternatively fix my htmlify.sh to not break on whitespace'd filenames
      • UPDATE: check this comment on a quick fix to avoid this rename script. BOOM! thx @kwef!
  • run htmlify.sh
    • htmlify has a hardcoded destination directory.
  • htmlify also expects the format-html.* files to be up one folder from it.
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
class Hash
def to_html
[
'<ul>',
map { |k, v| ["<li><strong>#{k}</strong>", v.respond_to?(:to_html) ? v.to_html : "<span>#{v}</span></li>"] },
'</ul>'
].join
end
end
@febuiles
febuiles / hubot.sh
Created November 25, 2011 22:02
Hubot startup script
#!/bin/sh
# This assumes you have:
# 1) A user called `hubot` in charge of the bot.
# 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials.
#
# To set the adapter either edit bin/hubot to specify what you want or append
# `-- -a campfire` to the $DAEMON variable below.
#
### BEGIN INIT INFO