This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Piggybak::Order.class_eval do | |
has_many :packages | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#clicky-chart").click(function(){ | |
var sd = '<%= @sd.to_date %>'; | |
var ed = '<%= @ed.to_date %>'; | |
$(this).hide(); | |
$.getJSON('http://api.getclicky.com/api/stats/4?site_id=<%= @store.clicky %>&sitekey=<%= @store.clicky_key %>&type=traffic-sources&date=' + sd + ',' + ed + '&output=json&json_callback=?',function(data){ | |
var sources = data[0].dates[0].items; | |
var series_data = []; | |
for(var i=0; i<sources.length; i++){ | |
var source = sources[i]; | |
series_data.push({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TwilioCallsController < ApplicationController | |
before_filter :authenticate_twilio_request, :only => [ | |
:twilio_handling_method_1, :twilio_handling_method_2 | |
] | |
def twilio_handling_method_1 | |
# do something Twilio-related | |
end | |
def twilio_handling_method_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Sparrow+SI.h | |
// | |
#import <UIKit/UIKit.h> | |
@interface SPUtils (DeviceAdditions) | |
+ (BOOL)isDevicePad; | |
+ (BOOL)isDeviceRetina; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shows = [{venue_id : 1, venue : 'The Showbox', date : '', acts : 'Pearl Jam,Soundgarden', featured : false, lat : '', long : ''},{venue_id : 2, venue : 'The Croc', date : '', acts : 'Sweeetwater', featured : false, lat : '', long : ''},{venue_id : 3, venue : 'Paramount', date : '', acts : 'Alice in Chains', featured : false, lat : '', long : ''},{venue_id : 1, venue : 'The Showbox', date : '', acts : 'Blue Scholars', featured : false, lat : '', long : ''}]; | |
venues = {}; | |
_.each(shows, function(o){ venues[o.venue_id] = o }); | |
unique_venues = _.values(venues); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tuggies ~/code/g5/core: rake -T | |
(in /Users/timmycrawford/code/g5/core) | |
rake default # Get set up for development. | |
rake parallel:create[count] # create test databases via db:create --> parallel:create[num_cpus] | |
rake parallel:drop[count] # drop test databases via db:drop --> parallel:drop[num_cpus] | |
rake parallel:features[count,path_prefix,options] # run features in parallel with parallel:features[num_cpus] | |
rake parallel:load_schema[count] # load dumped schema for test databases via db:schema:load --> parallel:load_schema[num_cpus] | |
rake parallel:migrate[count] # update test databases via db:mgrate --> parallel:migrate[num_cpus] | |
rake parallel:prepare[count] # update test databases by dumping and loading --> parallel:prepare[num_cpus] | |
rake parallel:spec[count,path_prefix,options] # run spec in parallel with parallel:spec[num_cpus] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "sinatra" | |
require "digest/sha1" | |
require 'rack-flash' | |
require 'mongoid' | |
require "sinatra-authentication" | |
use Rack::Session::Cookie, :secret => 'mongoid and sinatra does the body good' | |
use Rack::Flash | |
Mongoid.configure do |config| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ii libcurl3 7.19.7-1ubuntu1 Multi-protocol file transfer library (OpenSSL) | |
ii libopenssl-ruby 4.2 OpenSSL interface for Ruby | |
ii libopenssl-ruby1.8 1.8.7.249-2 OpenSSL interface for Ruby 1.8 | |
ii libssl-dev 0.9.8k-7ubuntu8 SSL development libraries, header files and documenta | |
ii openssl 0.9.8k-7ubuntu8 Secure Socket Layer (SSL) binary and related cryptogr | |
ii python-openssl 0.10-1 Python wrapper around the OpenSSL library | |
ii ssl-cert 1.0.23ubuntu2 simple debconf wrapper for OpenSSL | |
ii zlib1g-dev 1:1.2.3.3.dfsg-15ubuntu1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@content.body.convert_relative_to_absolute('http://iheartruby.com') |