Skip to content

Instantly share code, notes, and snippets.

View moonglum's full-sized avatar

Lucas Dohmen moonglum

View GitHub Profile
@moonglum
moonglum / static.ru
Created March 29, 2011 10:35
Serve static files
root=Dir.pwd
puts ">>> Serving: #{root}"
run Rack::Directory.new("#{root}")

magic-warden ideas

This Document is based on a document by Tobias Eilert, creator and maintainer of magic-warden

Setup

First, you need to install magic-warden.

gem install magic-warden
@moonglum
moonglum / fixtures_vs_factories.mdown
Created June 24, 2011 09:42
Fixtures vs. Factories from Ruby Rogues June, 24. 2011

Aaron Patterson:

  • Fixtures are faster than Factories (generated data is cached)
  • I don't know... I like them... ;)

Peter Cooper

  • DHH uses Fixtures, they must be good ;)
  • I used Fixtures on old projects, but they are not for me now
@moonglum
moonglum / .gitignore
Created July 6, 2011 14:56
This is a simple nested SVG Zoom and Pan Demo. Icons from Raphael.js
.DS_Store
@moonglum
moonglum / program.rb
Created December 13, 2011 10:58
MiniTest Expectation for Output of a codeblock. Captures everything that goes to stdout and lets you assert what it should be. Includes Expectation Syntax and a little Input helper.
def greet_world
puts "Hello World"
end
def greet_user
username = gets
puts "Hello #{username}"
end
@moonglum
moonglum / template.haml
Created March 6, 2012 10:27
Translator for Tobi
!!! 5
%head
%title I can haz chezburgerz plz?
%body
%h1
Hai
= bronie
@moonglum
moonglum / Gemfile
Created March 15, 2012 08:44
How I would test a HTTP Interface
source :rubygems
gem "httparty", "~> 0.8.1"
gem "rspec", "~> 2.8.0"
@moonglum
moonglum / .tm_properties
Created May 4, 2012 11:05
My .tm_properties
fontName = "Monaco"
fontSize = 14
softWrap = false
softTabs = true
tabSize = 2
# Add these files to the project view:
myExtraIncludes = ".tm_properties,.gitignore"
fileBrowserGlob = "{*,$myExtraIncludes}"
include = "{$include,$myExtraIncludes}"
@moonglum
moonglum / heckle.log
Created May 28, 2012 19:52
Output of Heckle
rm -r coverage
Profiling enabled.
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
@moonglum
moonglum / heckle.log
Created May 28, 2012 20:51
Fail Log for Heckle
rm -r coverage
Profiling enabled.
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................