Skip to content

Instantly share code, notes, and snippets.

View cookrn's full-sized avatar
👻

Ryan Cook cookrn

👻
View GitHub Profile
@cookrn
cookrn / out.txt
Created June 23, 2012 05:54
RVM 1.9.3 Ubuntu 12.04 Yaml Make Error
$ cat /usr/local/rvm/log/ruby-1.9.3-p194/yaml/make.log
[2012-06-23 05:51:12] make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /usr/local/rvm/src/yaml-0.1.4/config/missing --run aclocal-1.11
cd . && /bin/bash /usr/local/rvm/src/yaml-0.1.4/config/missing --run automake-1.11 --foreign
src/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:2: The usual way to define `LIBTOOL' is to add `LT_INIT'
src/Makefile.am:2: to `configure.ac' and run `aclocal' and `autoconf' again.
src/Makefile.am:2: If `LT_INIT' is in `configure.ac', make sure
src/Makefile.am:2: its definition is in aclocal's search path.
make: *** [Makefile.in] Error 1
@cookrn
cookrn / _readme.md
Created June 27, 2012 04:19
Compile *.ejs Templates

EJS Compiler

This is used to generate a templates.js file where the keys are template identifiers and the values are the raw, escaped EJS templates.

Templates are semi-compiled server side. Results of compilation are memoized on the client side using Underscore.

This is useful for maintaining multiple template files server-side and compiling them into a client-side script.

This requires the use of the ejs client side library. Requires ejs to be available on window. See: https://github.com/visionmedia/ejs#client-side-support

@cookrn
cookrn / quiz-1.md
Created September 27, 2012 20:33 — forked from ahoward/quiz-1.md
quiz-1.md
So you think you wanna be a web developer...

Fork this, update your copy with answers.

They don't need to be precise - pseudo-code is fine in most cases.

Some questions don't have correct answers.

@cookrn
cookrn / example.rb
Created November 19, 2012 04:46
Rough shot at what some Lattice Cell code might look like
require 'lattice'
class ApplicationCell
include Lattice::Cell
# Other custom stuff
end
class Person < Struct.new( :name , :birthday )
end
@cookrn
cookrn / ruby_version.out
Created November 21, 2012 19:00
`bundle install` with OJ gem fails on jruby-1.7.0
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.6.0_29-b11-402-11D50b [darwin-x86_64]
@cookrn
cookrn / ruby_version.out
Created November 21, 2012 19:00
`bundle install` with OJ gem fails on jruby-1.7.0
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.6.0_29-b11-402-11D50b [darwin-x86_64]
@cookrn
cookrn / context.md
Last active December 12, 2015 09:59
DSLs
@cookrn
cookrn / contact.md
Last active December 13, 2015 23:28
Ruby Variable Types
@cookrn
cookrn / client.rb
Created December 15, 2015 04:53
A tiny, standard-library only example of attaching to a running process over the network for inspection
#!/usr/bin/env ruby
require 'drb'
require 'irb'
DRb.start_service
$context = DRbObject.new_with_uri('druby://localhost:9876')
IRB.start
# it's not critical for understanding
# but here is the associated server-side action
#
def version
@program = load_program!
@version = @program.versions.find(params[:version_id])
if stale?(:last_modified => @version.updated_at, :etag => @version.cache_key)
render