Public Gists by zilkey

Gravatar
Wed Nov 04 19:21:14 -0800 2009
1
osascript -e "set Volume 10" && say "this will turn your volume on and say something"
Gravatar
Tue Oct 27 16:09:34 -0700 2009
1
2
3
# This allows you to have namespaced models in fixjour
module Fixjour
  class Builder
Gravatar
Wed Sep 30 08:28:23 -0700 2009
1
2
3
# created by Peter Jaros and Jeff Dean
 
require "rubygems"
gist: 153885 Data-backed state machine e...
Gravatar
Thu Jul 23 23:17:06 -0700 2009
1
2
3
# The following is an example of how to model a finite state machine using ruby objects.
# It supports:
# - determining if a crud action can be taken (can_read?, can_update? etc...) in a given state, with conditions
Gravatar
Thu May 07 14:11:29 -0700 2009
1
2
3
def in_memory_database?
  ENV["RAILS_ENV"] == "test" and
    ENV["IN_MEMORY_DB"] and
Gravatar
Wed Apr 29 10:29:55 -0700 2009
1
2
3
When /^I type "([^\"]*)" into the "([^\"]*)" rich text editor$/ do |description, iframe_id|
  selenium.select_frame "id=#{iframe_id}"
  selenium.type_keys "css=body", description
Gravatar
Thu Feb 26 19:54:22 -0800 2009
1
2
3
# app/views/hellos/erb.html.erb
# note the leading spaces - this makes it exactly the same number of bytes that erector outputs
         <%- 1000.times do -%><%= render :partial => "simple" %><%- end -%>
Gravatar
Sun Feb 15 10:48:09 -0800 2009
1
2
3
class Views::Layouts::Application < Erector::Widget
  def render
    div :class => "header" do
Gravatar
Fri Feb 06 12:40:45 -0800 2009
1
2
3
class Foo
  def bar
    "baz"
Gravatar
Tue Oct 28 19:45:02 -0700 2008
1
2
3
module Spec
  module Matchers
    class IncludeAll