Skip to content

Instantly share code, notes, and snippets.

Avatar

Isaac Sanders isaacsanders

View GitHub Profile
@isaacsanders
isaacsanders / gist:1351874
Created Nov 9, 2011 — forked from hay/gist:1351230
Enterprisify your Java Class Names!
View gist:1351874
<!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 Nov 17, 2011 — forked from bostonaholic/RECEIVE_REFUND.bas
how to receive a refund, basically
View RECEIVE_REFUND.bas
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
View oo.js
Foo = function(bar) {
this.bar = bar;
}
foo = new Foo('baz');
foo.bar = 'qux';
// This works.
View count.clj
(def a (atom 0))
(doseq [x [:a :b :c :d]
:while (not (nil? x))]
(swap! a inc))
a
View console.js
idea = new Idea()
//=> child
idea.fetch()
//=> TypeError: Cannot call method 'ajax' of undefined
View sugar_date.coffee
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?
View under.rb
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
View shared_examples.rb
module CoolMixin
# Cool functionality
end
class Base
end
class CoolCat < Base
include CoolMixin
end
View gist:1624529
#!/usr/bin/env ruby
require 'raptor'
class Posts
end
class Users
end