Skip to content

Instantly share code, notes, and snippets.

View xoebus's full-sized avatar
🤖
beep beep

Christopher Brown xoebus

🤖
beep beep
  • San Francisco, CA
View GitHub Profile
@xoebus
xoebus / README.md
Last active October 21, 2017 06:41
Send iMessages from the Command Line

imsg

Send iMessages from the Command Line


Install

Just run the following in your shell:

@xoebus
xoebus / buildfile.rb
Created March 14, 2012 01:17 — forked from seadowg/buildfile
Add growl 1.3 to buildr
# Add this to a buildr 'buildfile' to receive growl notifications when compilation
# completes or fails (including cc compilations)
require 'ruby_gntp'
# Growl setup
Buildr.application.on_completion do |title, message|
GNTP.notify({
:app_name => "buildr",
:title => title,
@xoebus
xoebus / tumblr.com.js
Created March 3, 2012 21:43
Remove Question and Answers from the Tumblr Dashboard
// Remove the dreadful question and answers from the dashboard.
setInterval(function() {
$('li > div.post_content > div.post_question').parent().parent().remove();
}, 5000);
@xoebus
xoebus / onog.rb
Created February 29, 2012 12:55
sdg
grades_table = Table :grades
students_table = Table :students
students_table_grades_table_join = join(students_table, grades_table, :_id, :student_id)
students_table_grades_table_join_select = select(students_table_grades_table_join, '*')
students_table_grades_table_join_select_filter = where(students_table_grades_table_join_select, students_table[:matric].eq('0824586'))
students_table_grades_table_join_select_filter_order = order(students_table_grades_table_join_select_filter, grades_table[:mark])
students_table_grades_table_join_select_filter_order_limit = limit(students_table_grades_table_join_select_filter_order, 1)
Output students_table_grades_table_join_select_filter_order_limit
@xoebus
xoebus / squeal.rb
Created February 29, 2012 02:16
Squeal
customers_table = Table :customers
customers_table_select = select(customers_table, '*')
customers_table_select_limit = order(customers_table_select, 2)
Output customers_table_select_order
if [ -d ~/.at-tools ]
then
echo "You already have Appleton Tower Tools installed. You'll need to remove ~/.at-tools if you want to install"
exit
fi
echo "Cloning Appleton Tower Tools..."
/usr/bin/env git clone git://github.com/lolsoft/at-tools.git ~/.at-tools
echo "Installing on your system..."
@xoebus
xoebus / sortedoutput.txt
Created February 22, 2012 23:50
Sorted Output
Buildfile: /Users/cb/Documents/UoE/ug4/adbs/ex1/build.xml
init:
build:
[javac] /Users/cb/Documents/UoE/ug4/adbs/ex1/build.xml:24: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
jar:
BUILD SUCCESSFUL
@xoebus
xoebus / dsl.rb
Created December 13, 2011 10:36
FUSE DSL Dreamland
Filesystem.new "/mount/point" do
directory "hello", :perms => [:r, :w] do
file "hello.txt" do |path|
path # File contains its own path.
end
directory "goodbye" do
handler SSHHandler.new(:username, :password)
end
end
@xoebus
xoebus / bloom.rb
Created November 30, 2011 20:59
A Bloom Filter in Ruby
require "zlib"
class BloomFilter
def initialize(size=100, hash_count=3)
raise(ArgumentError, "negative or zero buffer size") if size <= 0
raise(ArgumentError, "negative or zero hash count") if hash_count <= 0
@size = size
@hash_count = hash_count
@buffer = Array.new(size, false)
@xoebus
xoebus / rules.md
Created September 19, 2011 18:51
F1 Grand Prix Pub Game
Name Action Laps
Laps Shot 3
Alcopop/Mixer 5
Pint 8
Ale 10
Overtake Down a pint 3
Fastest Lap Dirty Pint 40
KERS (Once per pub) Strawpedo 8
Grid Drop Late to pub -10 (per pub)