Skip to content

Instantly share code, notes, and snippets.

View isaacsanders's full-sized avatar

Isaac Sanders isaacsanders

View GitHub Profile
@isaacsanders
isaacsanders / gist:1351874
Created November 9, 2011 15:56 — forked from hay/gist:1351230
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<title></title>
<style>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
@isaacsanders
isaacsanders / RECEIVE_REFUND.bas
Created November 17, 2011 22:11 — forked from bostonaholic/RECEIVE_REFUND.bas
how to receive a refund, basically
000 SUB RECEIVE_REFUND
010 ASK POLITELY
020 IF REFUND = "YES" THEN
030 GOTO GOODBYE
040 ELSE
050 GOTO ASK_STERNLY
060 END IF
070 ASK_STERNLY:
080 ASK STERNLY
090 IF REFUND = "YES" THEN
@isaacsanders
isaacsanders / gist:1383966
Created November 21, 2011 21:15
Angela's sticker
then refactor
@isaacsanders
isaacsanders / oo.js
Created November 26, 2011 23:05
Ruby v JS
Foo = function(bar) {
this.bar = bar;
}
foo = new Foo('baz');
foo.bar = 'qux';
// This works.
@isaacsanders
isaacsanders / count.clj
Created December 1, 2011 02:25
Hey Carin....
(def a (atom 0))
(doseq [x [:a :b :c :d]
:while (not (nil? x))]
(swap! a inc))
a
idea = new Idea()
//=> child
idea.fetch()
//=> TypeError: Cannot call method 'ajax' of undefined
startOfMonth: (date) ->
startOfMonth = date.beginningOfMonth()
console.log startOfMonth.format('{MM}-{DD}-{YYYY}')
endOfMonth: (date) ->
endOfMonth = date.endOfMonth()
console.log endOfMonth.format('{MM}-{DD}-{YYYY}')
# Maybe this?
@isaacsanders
isaacsanders / under.rb
Created January 4, 2012 15:55
Ruby Under
class File
instance_eval do
:open.is_inverse_of(:close)
end
end
File.under(:open, *open_args) do |file|
# do stuff to the file
end
@isaacsanders
isaacsanders / shared_examples.rb
Created January 4, 2012 17:21
Shared Examples
module CoolMixin
# Cool functionality
end
class Base
end
class CoolCat < Base
include CoolMixin
end
#!/usr/bin/env ruby
require 'raptor'
class Posts
end
class Users
end