Skip to content

Instantly share code, notes, and snippets.

View christianchristensen's full-sized avatar

Chris Christensen christianchristensen

View GitHub Profile
package main
import (
"fmt"
"net/textproto"
"regexp"
"strings"
)
type PrivMsg struct {
@christianchristensen
christianchristensen / puppet-git-receiver-install
Created September 4, 2012 02:44 — forked from johnl/brightbox cloud example
puppet-git-receiver cloud-config install script
#cloud-config
apt_sources:
- source: "ppa:brightbox/puppet"
packages:
- puppet-git-receiver
- rubygems
runcmd:
- cp -ar /home/ubuntu/.ssh /var/lib/puppet-git-receiver/
- chown -R puppet-git.puppet-git /var/lib/puppet-git-receiver/.ssh
- gem install librarian-puppet --no-ri --no-rdoc
@christianchristensen
christianchristensen / Migration.md
Created April 26, 2012 04:05
Implementing AllPlayers.com sign-in with Silex and PHP
@christianchristensen
christianchristensen / libpng.rb
Created October 5, 2011 14:48 — forked from tobiastom/libpng.rb
PHP Homebrew Formular
require 'formula'
class Libpng < Formula
url 'http://downloads.sourceforge.net/project/libpng/libpng15/1.5.5/libpng-1.5.5.tar.bz2'
homepage 'http://www.libpng.org/pub/png/libpng.html'
md5 '3270bf2990c3174ae939388398de751e'
keg_only :provided_by_osx,
"TODO: Which software depends on this newer version of libpng?"
.DS_Store
*.csv
*.pdf
$('select.jump_list').change(function() {
if (!this.value) {
return;
}
var url, url_len, last_char;
if (this.value.match('://')) {
window.top.location = this.value;
}
module Enumerable
# Iterate over this array randomly.
# From: http://stackoverflow.com/questions/2459913/how-can-i-randomly-iterate-through-a-large-range
# And: http://refactormycode.com/codes/40-is_prime
def randomized
return to_enum(:randomized) unless block_given?
def is_prime?(num)
i = 3