Skip to content

Instantly share code, notes, and snippets.

From e9fb83adf031610f7ed27bd2cd79a1230bc9ba6f Mon Sep 17 00:00:00 2001
From: jefflab <jefflabarge@gmail.com>
Date: Wed, 21 Jul 2010 23:50:34 -0700
Subject: [PATCH] don't destroy arguments in style constructor
---
lib/paperclip/style.rb | 8 ++++----
test/style_test.rb | 14 ++++++++++++++
2 files changed, 18 insertions(+), 4 deletions(-)
source 'http://rubygems.org'
gem 'rails', '3.0.0.rc'
gem 'mysql'
gem 'haml'
gem 'simple_form'
gem 'devise'
gem 'friendly_id', '~> 3.0'
gem 'validates_existence', '>= 0.4'
gem 'bluecloth'
=begin
This is a machine generated main stub file using stdlib-doc
Created on Thu Mar 12 13:35:16 +0300 2009 by IntelliJ Ruby Stubs Generator.
This documentation uses content from the book "Programming Ruby - The Pragmatic Programmer's Guide"
Copyright � 2001 by Addison Wesley Longman, Inc. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/)).
Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder.
Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.
This documentation uses content form the article http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Variables_and_Constants#Pre-defined_Variables
# How to print objects like the irb console
user = User.new( :name => "Henry" )
puts "#{user.inspect}" # print object in string
p user # shortcut, same as above
// main.html
<frameset rows="50,*">
<frame src="nav_bar.html" />
<frame src="http://www.zoodles.com/" />
</frameset>
// background.html
chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
{
"name": "test",
"description": "test",
"version": "1",
"background_page": "app/background.html",
"app": {
"launch": {
"local_path": "app/main.html"
}
},
<select id="server">
<option value="localhost.zoodles.com">localhost.zoodles.com</option>
<option value="staging.zoodles.com">staging.zoodles.com</option>
<option value="www.zoodles.com">www.zoodles.com</option>
</select>
$( '#server' ).children( "[value='" + zoodles.server + "']" ).attr( 'class', 'cow' );
[<option value=​"localhost.zoodles.com" class=​"cow">​localhost.zoodles.com​</option>​]
$( '#server' ).children( "[value='" + zoodles.server + "']" ).attr( 'selected', 'true' );
@jefflab
jefflab / gist:651886
Created October 28, 2010 17:38
vidsync get
jeffbox:www> pwd
/Users/jlabarge/code/zoodles/www
jeffbox:www> find . -name "*.rb" -exec grep "StorybookVideo" {} \; -print
StorybookVideo.find(slug).put(:sync)
StorybookVideo.find(slug).destroy
./app/models/book_reading_page.rb
class StorybookVideo < ActiveResource::Base
./app/resources/storybook_video.rb
StorybookVideo.should_receive(:find).ordered.with(@page.slug).and_return(video)
StorybookVideo.should_receive(:find).with(@page.slug).and_return(video)
# ERROR
jeffbox:www> vagrant up
There was a problem with the configuration of Vagrant. The error message(s)
are printed below:
vm:
* Base MAC address for eth0/NAT must be set. Contact box maintainer for more information.
# Vagrantfile
TypeError: Error #1009: Cannot access a property or method of a null object reference.
atVideoTool/_assign_camera()[/Users/jhollenbeck/Sites/zoodles/av/video_tool/src/VideoTool.as:121]
atVideoTool/_setup_video()[/Users/jhollenbeck/Sites/zoodles/av/video_tool/src/VideoTool.as:101]
atVideoTool/_event_stage_init()[/Users/jhollenbeck/Sites/zoodles/av/video_tool/src/VideoTool.as:51]
mxmlc -debug=true video_tool/src/VideoTool.as
cp video_tool/src/VideoTool.swf ~/code/zoodles/www/public/widgets/video_tool.swf
TypeError: Error #1009: Cannot access a property or method of a null object reference.
atMailRecorder/setupVideo()[/Users/jlabarge/code/zoodles/av/mail_recorder/src/MailRecorder.as:207]