Skip to content

Instantly share code, notes, and snippets.

View raws's full-sized avatar
🥯
dabbling in pumpernickel

Ross Paffett raws

🥯
dabbling in pumpernickel
View GitHub Profile
  1. From Mr_Rabies on Sat, Jul 19 2014 at 10:25 UTC:
    farted too hard send help

  2. From Mr_Rabies on Sat, Jul 19 2014 at 10:40 UTC:
    i can see the higgs and the boson they are beautiful reality itself is collapsing around this fart

  3. From Mr_Rabies on Sat, Jul 19 2014 at 10:41 UTC:
    my god it's full of stars

  4. From CCP on Sat, Jul 19 2014 at 19:31 UTC:

Keybase proof

I hereby claim:

  • I am raws on github.
  • I am raws (https://keybase.io/raws) on keybase.
  • I have a public key whose fingerprint is 4ABE CA14 6DA0 809F 2A80 EAB9 1E0A 2E61 486B DB1F

To claim this, I am signing this object:

proc checkbox {args} {
set choice [expr {int(rand()*[llength $args])}];
for {set i 0} {$i < [llength $args]} {incr i} {
if {$i == $choice} {
lset args $i [format {[x] %s} [lindex $args $i]]
} else {
lset args $i [format {[ ] %s} [lindex $args $i]]
}
};
puts [join $args { }];
proc lo5 {who} {
upvar #0 sender sender;
set blank { };
set prefix [string range $blank 0 [string length $sender(nick)]];
puts "$sender(nick) \\o/ \\o/ $who";
puts "$prefix \\\\_ _//";
puts "$prefix /\\ /\\";
}
@raws
raws / array#pick.rb
Created August 31, 2009 04:22
An instance method for Ruby's Array class which picks a number of elements from the array at random
class Array
# Pick +number+ random elements out of the array. If +number+ is
# greater than the size of the array, this method will simply return
# the array itself, sorted randomly.
def pick(number)
sort_by { rand }.slice(0...number)
end
end
# Global Away.scpt
#
# This Colloquy plugin takes over the "/away" command and sets your away and
# back status for all connections at once.
#
# Version: 1.0 (8 September 2009)
# Author: Ross Paffett (ross@rosspaffett.com)
# License: Distributed under the same terms as Colloquy.
using terms from application "Colloquy"
class CommandsController < ApplicationController
before_filter :authorize, :except => [ :index, :show ]
def index
@commands = Command.all(:order => "name")
end
def new
@command = Command.new(params[:command])
end
exit if ARGV.empty?
require 'timeout'
# Upload files to Hey.
uploaded = Array.new
ARGV.each do |f|
next unless File.exists?(f)
type = case File.extname(f).downcase
when '.jpg', '.jpeg' then 'image/jpeg'
module Wheaties
module Commands
module Channel
def on_join
channel = response.args.first
if response.sender.nick == connection.nick
broadcast(:who, channel)
log(:info, "Joined", channel)
end
module Wheaties
class Connection < EventMachine::Protocols::LineAndTextProtocol
attr_reader :nick, :user, :real, :channels
class << self
def instance
@@instance
end
end