Skip to content

Instantly share code, notes, and snippets.

rw-r--r-- 1 root root 2661 2008-07-07 15:36 049_add_id_caches_to_user.rb
-rw-r--r-- 1 root root 5624 2008-07-07 15:36 051_add_indexes.rb
-rw-r--r-- 1 root root 560 2008-07-07 15:36 052_create_ratings.rb
-rwxr-xr-x 1 root root 461 2008-07-07 15:36 053_add_notice_to_user_participations.rb
-rwxr-xr-x 1 root root 2658 2008-07-07 15:36 054_add_more_indexes.rb
-rw-r--r-- 1 root root 592 2008-07-07 15:36 055_drop_pictures.rb
-rw-r--r-- 1 root root 205 2008-07-07 15:36 056_rename_federations.rb
-rw-r--r-- 1 root root 3858 2008-07-07 15:36 058_create_profiles.rb
-rw-r--r-- 1 root root 1693 2008-07-07 15:36 059_make_user_caches_binary.rb
-rw-r--r-- 1 root root 577 2008-07-07 15:36 060_add_privacy_flags_to_groups.rb
var FlickrApi = function() { this.initialize.apply(this, arguments);};
//replace here
FlickrApi.md5sum = function(str) { return 'hashed value';}
FlickrApi.prototype = (function(){
//private
function getSig(secret, params)
{
var a = [];
for (var k in params) {
require 'rubygems'
require 'fireeagle'
require 'twitter'
# get yourself an access token by hand on the irb commandline with the oauth gem
fe = FireEagle::Client.new(:consumer_key => "<yourkey>", :consumer_secret => "<yoursecret>", :access_token => "<youraccesstoken>", :access_token_secret => "<youraccesstokensecret>")
t=Twitter::Base.new "<yournick>","<yourpassword>"
lat = nil
lng = nil
while true
# Required for using Mongrel with Capistrano2
# gem install palmtree
require 'palmtree/recipes/mongrel_cluster'
########################################################################
# Rails Boxcar - Capistrano Deployment Recipe
# Configuration
########################################################################
# What is the name of your application? (no spaces)
<% content_for('body') do %>
<% split_view :workspace, :class => 'sc-app-workspace', :style => 'height: 200px', :direction => :horizontal do %>
<% view :sidebar, :outlet => true do %>
<% scroll_view :master_list, :outlet => true do %>
<%= list_view :list,
:view => 'IndexScroller.MyListView',
:outlet => true,
:content_value_key => 'fullName',
:bind => { :content => 'IndexScroller.listController.arrangedObjects' }
%>
@martinus
martinus / e.rb
Created July 24, 2008 17:35
extract any archive
#!/usr/bin/ruby
# The program e is a command line utility that extracts lots of
# different archives. It is very simple and can be extended very easily.
#
# It is inspired by how firewall use their rulesets, and works like this:
#
# * For each file that has to be extracted, the rules are matched one after the other.
# * When a rule matches (either by the filetype or filename), the command is executed.
# * If the command does not return an error code the extraction is considered successful,
# otherwise the next rules are matched.
# use PathPrefix Middleware if :path_prefix is set in Merb::Config
if prefix = ::Merb::Config[:path_prefix]
use Merb::Rack::PathPrefix, prefix
end
# comment this out if you are running merb behind a load balancer
# that serves static files
use Merb::Rack::Static, Merb.dir_for(:public)
$: << File.dirname(__FILE__)
require 'spec_helper'
describe "Product REST Service findByUpdateDate" do
before(:each) do
end
it 'should only find products created within the date ran ge given' do
# access these directory shortcuts
# with ~rails, ~beast, etc
p=~/p
w=~/w
rails=~/p/rails/git
todo=~/Documents/todo
# Input stuff.
bindkey -e
/opt/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.3/lib/dm-validations/numeric_validator.rb:17:in `send': undefined method `product_id' for #<Shirt:0x25d9628> (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.3/lib/dm-validations/numeric_validator.rb:17:in `call'
from /opt/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.3/lib/dm-validations/contextual_validators.rb:48:in `execute'
from /opt/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.3/lib/dm-validations/contextual_validators.rb:46:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.3/lib/dm-validations/contextual_validators.rb:46:in `execute'
from /opt/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.3/lib/dm-validations.rb:87:in `hookable__valid_ques_before_advised'
from /opt/local/lib/ruby/gems/1.8/gems/extlib-0.9.3/lib/extlib/hook.rb:294:in `valid?'
from /opt/local/lib/ruby/gems/1.8/gems/extlib-0.9.3/lib/extlib/hook.rb:292:in `catch'
from /opt/local/lib/ruby/gems/1.8/gems/extlib-0.9.3/lib/extli