Public Gists by deepthawtz

Gravatar
Wed Sep 23 07:49:14 -0700 2009
1
2
3
Feature: The Idea Center is for users to share ideas, get feedback on them, and provoke people to launch software projects based on them.
  In order to get users to give me feedback on my idea
  As an innovator
Gravatar
Tue Aug 25 16:20:39 -0700 2009
1
2
3
module A
 
  # allows methods to be namespaced as A.foo, A.bar, etc...
Gravatar
Wed Aug 05 15:22:38 -0700 2009
1
2
3
#!/usr/bin/python
 
import urllib2
Gravatar
Tue Mar 31 02:24:20 -0700 2009
1
2
3
chars = "hullo".tap { |x| puts "original -- #{x.inspect}" }.
  each_char.tap { |x| puts "each_char -- #{x.inspect}" }.
  each_char.select{|x| x.inspect 'l'}.tap {|x| puts "chained each_char() and select() -- #{x.inspect}" }
Gravatar
Tue Mar 17 00:24:25 -0700 2009
1
2
3
require "thin"
 
module Merb
Gravatar
Tue Mar 17 00:19:10 -0700 2009
1
2
3
class Merb::BootLoader::RackUpApplication < Merb::BootLoader
  # Setup the Merb Rack App or read a rackup file located at
  # Merb::Config[:rackup] with the same syntax as the
Gravatar
Tue Mar 17 00:17:44 -0700 2009
1
2
3
# Set up cookies support in Merb::Controller and Merb::Request
class Merb::BootLoader::Cookies < Merb::BootLoader
 
Gravatar
Tue Mar 17 00:16:35 -0700 2009
1
2
3
# Register the default MIME types:
#
# By default, the mime-types include:
Gravatar
Tue Mar 17 00:12:37 -0700 2009
1
2
3
   # ==== Parameters
    # io<#path>:: An IO containing the full path of the template.
    # name<String>:: The name of the method that will be created.
Gravatar
Tue Mar 17 00:05:14 -0700 2009
1
2
3
class Merb::BootLoader::BeforeAppLoads < Merb::BootLoader
 
  # Call any before_app_loads hooks that were registered via before_app_loads
Gravatar
Tue Mar 17 00:04:29 -0700 2009
1
2
3
class Merb::BootLoader::MixinSession < Merb::BootLoader
 
  # Mixin the session functionality; this is done before BeforeAppLoads
Gravatar
Tue Mar 17 00:03:26 -0700 2009
1
2
3
class Merb::BootLoader::Dependencies < Merb::BootLoader
 
  # ==== Returns
Gravatar
Tue Mar 17 00:00:22 -0700 2009
1
2
3
    # ==== Parameters
    # *path::
    # The relative path (or list of path components) to a directory under the
Gravatar
Mon Mar 16 23:59:30 -0700 2009
1
2
3
    # ==== Parameters
    # type<Symbol>:: The type of path to retrieve directory for, e.g. :view.
    #
Gravatar
Mon Mar 16 23:58:32 -0700 2009
1
2
3
    # This is the mechanism for setting up your application layout.
    # There are three application layouts in Merb:
    #
Gravatar
Mon Mar 16 23:56:37 -0700 2009
1
2
3
    def build_framework
      if File.exists?(Merb.root / "config" / "framework.rb")
        require Merb.root / "config" / "framework"
Gravatar
Mon Mar 16 23:53:22 -0700 2009
1
2
3
# Build the framework paths.
#
# By default, the following paths will be used:
Gravatar
Mon Mar 16 23:50:52 -0700 2009
1
2
3
  # Load Slice classes before the app's classes are loaded.
  #
  # This allows the application to override/merge any slice-level classes.
Gravatar
Mon Mar 16 23:48:18 -0700 2009
1
2
3
      # Execute this boot loader after the specified boot loader.
      #
      # ==== Parameters
Gravatar
Mon Mar 16 23:47:06 -0700 2009
1
2
3
      # Adds the inheriting class to the list of subclasses in a position
      # specified by the before and after methods.
      #