View gobot.go
package main
import (
"fmt"
"net/textproto"
"regexp"
"strings"
)
type PrivMsg struct {
View puppet-git-receiver-install
#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
View libpng.rb
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?"
View select_jump_list.js
$('select.jump_list').change(function() {
if (!this.value) {
return;
}
var url, url_len, last_char;
if (this.value.match('://')) {
window.top.location = this.value;
}
View random_iterator.rb
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