Skip to content

Instantly share code, notes, and snippets.

@ryancrum
ryancrum / jquerytest.cljs
Created July 21, 2011 02:24
How to use jQuery from ClojureScript
(ns jquerytest.core)
(def jquery (js* "$"))
(jquery
(fn []
(-> (jquery "div.meat")
(.html "This is a test.")
(.append "<div>Look here!</div>"))))
anonymous
anonymous / vending_machine.rb
Created July 9, 2011 08:55
TDDBC TOKYO 1.5 VendingMachine
# -*- coding: utf-8 -*-
class Drink
attr_accessor :name, :price
def initialize(name, price)
self.name = name
self.price = price
end
end
class Money
I am the owner of lvh.me. And I'm glad to hear it's helpful. In truth, it's just a fancy DNS trick. lhv.me and all of it's sub-domains just point back to your computer (127.0.0.1). That means running ssl is as simple (or difficult) as running ssl on your computer.
I'm not sure how comfortable you are with the command line, but here's my how I setup my development environment. (rvm, passenger, nginx w/ SSL, etc).
# Install rvm (no sudo!)
# ------------------------------------------------------
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
source ~/.rvm/scripts/rvm
rvm install ree-1.8.7-2010.02
anonymous
anonymous / gist:306417
Created February 17, 2010 07:56
Maybe monad is monad
Definition bind {A B : Type} (m : option A) (f : A -> option B) : option B :=
match m with
None => None
| Some v => f v
end.
Infix ">>=" := bind (at level 50).
Definition ret {A : Type} (v : A) : option A :=
Some v.