Public Gists by markbates

Gravatar
Fri Sep 25 07:50:50 -0700 2009
1
2
3
def run_task(task, app=nil, use_sudo=false, extra_args='')
  apps = (app.nil? || app == :all) ? [:rtis, :mc, :pp] : [app]
  sudo = use_sudo ? 'sudo ' : ''
Gravatar
Mon Sep 21 11:47:40 -0700 2009
1
2
3
    def to_xml
      # av = ActionView::Base.new(Rails.configuration.view_path)
      # av.assigns[:batch] = self
Gravatar
Tue Sep 15 15:52:34 -0700 2009
1
2
3
  it 'should take the query string into account' do
    get '/?foo=bar'
    response.status.should == 200
Gravatar
Wed Sep 09 11:58:12 -0700 2009
1
2
3
configatron.letters = 'a-b-c-d'
configatron.my.letters = Configatron::Delayed do
  "My letters are: #{configatron.letters}"
Gravatar
Wed Sep 02 06:54:45 -0700 2009
1
2
3
puts "APN::Device.count (Before): #{APN::Device.count}"
puts "APN::Notification.count (Before): #{APN::Notification.count}"
 
Gravatar
Thu Aug 20 10:28:31 -0700 2009
1
2
3
class User < ActiveRecord::Base
end
 
Gravatar
Tue Aug 11 13:03:28 -0700 2009
1
2
3
group(:default, :source => 'http://gems.secondrotation.com') do |g|
  g << {:name => 'rails', :version => '>=2.3.3'}
  g << {:name => 'markbates-configatron', :source => 'http://gems.github.com'}
Gravatar
Sat Aug 01 16:26:01 -0700 2009
1
2
3
APN::Connection.open_for_delivery do |conn, sock|
  loop do
    notifications = APN::Notification.all(:conditions => {:sent_at => nil})
Gravatar
Mon Jul 27 18:36:48 -0700 2009
1
2
3
Part 1: Standard Library
 
  Chapter 1: Distributed Ruby (DRb)
Gravatar
Sat Jul 25 13:33:47 -0700 2009
1
2
3
- (void)applicationDidFinishLaunching:(UIApplication *)application {
  [window addSubview:[navigationController view]];
  [window makeKeyAndVisible];
Gravatar
Fri Jul 24 13:05:28 -0700 2009
1
2
3
# Create a new device with your iPhone device token:
device = Device.create(:token => '5gxadhy6 6zmtxfl6 5zpbcxmw ez3w7ksf qscpr55t trknkzap 7yyt45sc g6jrw7qz')
 
Gravatar
Sat Jun 20 21:19:44 -0700 2009
1
2
3
Part 1: Standard Library
 
  Chapter 1: Distributed Ruby (DRb)
Gravatar
Thu Apr 02 17:58:39 -0700 2009
1
2
3
13239240
13099710
12966510
Gravatar
Thu Apr 02 17:58:01 -0700 2009
1
2
3
require 'pcp_middleware'
require 'benchmark'
 
Gravatar
Fri Jan 02 14:09:22 -0800 2009
1
2
3
    class StripesBuilder
      include Mack::View::FormBuilder
      
Gravatar
Fri Jan 02 14:08:42 -0800 2009
1
2
3
  class GodfatherFormBuilder
    include Mack::View::FormBuilder
    
Gravatar
Fri Nov 21 16:11:30 -0800 2008
1
2
3
configatron.letters.a = 'A'
configatron.letters.b = 'B'
configatron.lock(:letters)
Gravatar
Thu Nov 20 04:07:22 -0800 2008
1
2
3
require 'rubygems'
require 'configatron'
 
Gravatar
Wed Oct 22 10:30:21 -0700 2008
1
2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Gravatar
Wed Oct 22 10:28:48 -0700 2008
1
2
3
<h1>Edit User</h1>
 
<%= error_messages_for :user %>