Skip to content

Instantly share code, notes, and snippets.

View graybill's full-sized avatar

Linus Graybill graybill

  • Philadelphia, PA
View GitHub Profile
def last_quarter
x = (Date.today.strftime('%m').to_f / 12 * 100).to_i
y = 25; i = 0
while x > y do
y += 25; i += 1
end
quarters[i]
end
@graybill
graybill / .bashrc
Created April 6, 2012 14:50
Force subl command
subl()
{
/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl $1;
}
@graybill
graybill / mcmuffinme.coffee
Created January 9, 2012 16:53
Hubot mcmuffin script
# Display a random picture of Mr. McMuffin
images = [
"http://dl.dropbox.com/u/1648860/mcmuffins/5108446504_90d51ab3ff_b.jpg",
"http://dl.dropbox.com/u/1648860/mcmuffins/5215878205_c9bccb9810_b.jpg",
"http://dl.dropbox.com/u/1648860/mcmuffins/5335274214_8c839c92c6_b.jpg",
"http://dl.dropbox.com/u/1648860/mcmuffins/5584803853_08b2bf6c7a_b.jpg",
"http://dl.dropbox.com/u/1648860/mcmuffins/5607948846_92c4203abc_b.jpg",
"http://dl.dropbox.com/u/1648860/mcmuffins/5903446278_63b50bf892_b.jpg",
"http://dl.dropbox.com/u/1648860/mcmuffins/6031412944_91a619847d_o.jpg",
@graybill
graybill / reset.css
Created December 15, 2011 00:06
reset.css
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
95) Error:
test_should_not_filter_index_without_distributor_id(DistributorAdministratorsControllerTest):
ArgumentError: wrong number of arguments (5 for 4)
actionpack (3.1.2) lib/action_controller/test_case.rb:365:in `process'
actionpack (3.1.2) lib/action_controller/test_case.rb:365:in `get'
test/functional/distributor_administrators_controller_test.rb:32:in `test_should_not_filter_index_without_distributor_id'
activesupport (3.1.2) lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
activesupport (3.1.2) lib/active_support/testing/setup_and_teardown.rb:67:in `run'
activesupport (3.1.2) lib/active_support/callbacks.rb:435:in `_run_setup_callbacks'
activesupport (3.1.2) lib/active_support/callbacks.rb:81:in `send'
@graybill
graybill / Project.sublime-project
Created November 14, 2011 17:56
Sublime Project File
{
"folders":
[
{
"path": "/Users/admin/code/octopress"
}
]
}
it("should make a server request from passed options", function() {
runs(function(){
var options = { endPoint: '/json/admin/user',
method: 'get_list',
data: {},
successCallback: function(res) {
// can i put a spy here to make sure the callback is fired?
console.log("SUCCESS")
console.log(res)
}
aptype "string"
caption "City"
description "The city of the collateral property."
key "ag5kZXZ-bGFjb2RhemVyb3I...W1wbGF0ZVByb3BlcnR5GA4M"
required false
has_attached_file :photo, :styles => { :medium => '220x220#', :thumb => '48x48#' },
:storage => :s3,
:bucket => 'weworkinphilly',
:s3_credentials => {
:access_key_id => ENV['S3_KEY'],
:secret_access_key => ENV['S3_SECRET']
}
scblanda@gmail.com
<im:html xmlns:im='http://jabber.org/protocol/xhtml-im'><xht:body xmlns:xht='http://www.w3.org/1999/xhtml' style='background-color:#c0e668;color:#000000;'><xht:span style='font-family: 'Helvetica';font-size: 12px;'>now that's not letting me download</xht:span></xht:body></im:html>
<im:html xmlns:im='http://jabber.org/protocol/xhtml-im'><xht:body xmlns:xht='http://www.w3.org/1999/xhtml' style='background-color:#c0e668;color:#000000;'><xht:span style='font-family: 'Helvetica';font-size: 12px;'>ha</xht:span></xht:body></im:html>
<im:html xmlns:im='http://jabber.org/protocol/xhtml-im'><xht:body xmlns:xht='http://www.w3.org/1999/xhtml' style='background-color:#c0e668;color:#000000;'><xht:span style='font-family: 'Helvetica';font-size: 12px;'>ill restart</xht:span></xht:body></im:html>