Public Gists by bruce

gist: 228408 An example of alphanumeric ...
Gravatar
Fri Nov 06 16:19:06 -0800 2009
1
2
3
require 'rubygems'
 
raw = %w(1.0 1.1 1.0b1 1.0b2 1.0a 1.0.b.1 1.0a2 1.0.b.2 1.0.b1 1.0.b2 0.9)
Gravatar
Wed Jul 29 14:46:58 -0700 2009
1
2
alias publish-production='git push && git tag production -f && git push origin production && cap production deploy'
alias publish-staging='git push && git tag staging -f && git push origin staging && cap deploy'
Gravatar
Mon Jul 20 15:32:44 -0700 2009
1
2
3
# Hack to convert arbitrary Ruby objects into vanilla objects
require 'yaml'
 
Gravatar
Mon Jul 13 14:06:20 -0700 2009
1
2
3
# lib/tyranny.rb
 
require 'rubygems'
Gravatar
Tue Apr 28 16:12:13 -0700 2009
1
2
3
  task :remote_db_dump, :roles => :db, :only => { :primary => true } do
    run "cd #{deploy_to}/#{current_dir} && " +
      "rake RAILS_ENV=#{rails_env} db:database_dump --trace"
Gravatar
Sun Apr 26 18:04:46 -0700 2009
1
2
3
@import blueprint/screen.sass
@import blueprint/modules/scaffolding.sass
@import compass/reset.sass
Gravatar
Tue Mar 24 15:02:03 -0700 2009
1
2
3
<html>
  <head>
    <script type="text/javascript" src="/jquery.js"></script>
Gravatar
Wed Mar 04 10:24:30 -0800 2009
1
2
3
>> a = "foo"
=> "foo"
>> def a.bar
Gravatar
Wed Mar 04 09:46:35 -0800 2009
1
2
3
module Sold
 
  def self.included(base)
gist: 73704 For my brother, the OCR guy
Gravatar
Tue Mar 03 20:23:45 -0800 2009
1
2
3
#!/bin/bash
 
for file in $*
Gravatar
Thu Feb 26 18:31:20 -0800 2009
1
2
3
# From rtex-2.1.0
 
        def render_with_rtex(options=nil, *args, &block)
Gravatar
Sat Feb 07 14:33:13 -0800 2009
1
2
3
module GitHubbyGems
  
  def gem(name, options = {})
Gravatar
Fri Jan 30 13:59:40 -0800 2009
1
2
3
class AClassicPattern < ActiveRecord::Migration
 
  def self.up
Gravatar
Sat Jan 24 20:51:12 -0800 2009
1
2
3
>>> import logging
>>> f = logging.getLogger('foo')
>>> b = logging.getLogger('bar')
Gravatar
Fri Jan 16 11:58:38 -0800 2009
1
2
3
module LanguageTaxonomy
 
  def self.build(data)
Gravatar
Thu Jan 15 13:58:01 -0800 2009
1
2
3
from django.db import models
 
class UserManager(models.Manager):
Gravatar
Mon Jan 12 22:16:47 -0800 2009
1
2
3
{
  "name": "Antiques",
  "count": 1826,
Gravatar
Wed Jan 07 01:13:06 -0800 2009
1
2
3
Widget metaclass ancestors...
[Wrapper, Class, Module, Object, Kernel]
The 2 `new' methods get invoked...
Gravatar
Mon Jan 05 00:47:46 -0800 2009
1
2
3
$:.unshift(File.dirname(__FILE__) << '/../lib')
 
require 'clingwrap'
Gravatar
Sun Jan 04 00:59:06 -0800 2009
1
2
3
# Playing with it in irb:
 
>> (class << Widget; self; end).ancestors