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
| - cache [@user, @user.posts] do | |
| = @user.inspect | |
| - @user.posts.each do |post| | |
| - cache post do | |
| = post.inspect |
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
| %h1 Heading 2 | |
| :javascript | |
| console.info | |
| %h2 Heading 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
| source :rubygems | |
| gem 'linkedin' | |
| gem 'vcr' |
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
| storm:macruby-0.10 rob$ rake | |
| WARNING: Global access to Rake DSL methods is deprecated. Please include | |
| ... Rake::DSL into classes and modules which use the Rake DSL methods. | |
| WARNING: DSL method Rake::UpstreamGitRepoTasks#namespace called at /Users/rob/Sites/macruby-0.10/rakelib/upstream_git_repo_tasks.rb:25:in `define' | |
| WARNING: DSL method Rake::UpstreamGitRepoTasks#desc called at /Users/rob/Sites/macruby-0.10/rakelib/upstream_git_repo_tasks.rb:26:in `block in define' | |
| WARNING: DSL method Rake::UpstreamGitRepoTasks#task called at /Users/rob/Sites/macruby-0.10/rakelib/upstream_git_repo_tasks.rb:27:in `block in define' | |
| WARNING: DSL method Rake::UpstreamGitRepoTasks#desc called at /Users/rob/Sites/macruby-0.10/rakelib/upstream_git_repo_tasks.rb:37:in `block in define' | |
| WARNING: DSL method Rake::UpstreamGitRepoTasks#task called at /Users/rob/Sites/macruby-0.10/rakelib/upstream_git_repo_tasks.rb:38:in `block in define' | |
| WARNING: DSL method Rake::UpstreamGitRepoTasks#desc called at /Users/rob/Sites/macruby-0.10/ra |
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
| <html> | |
| <head> | |
| <style type="text/css"> | |
| #side { | |
| width: 300px; | |
| font-family: Helvetica; | |
| } | |
| .bv_leaderboard_wrapper { | |
| background-color: #cccccc; | |
| padding: 10px; |
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
| // Read temperature/humidity from sensor and display on LCD screen | |
| #include <SoftwareSerial.h> | |
| #include <Sensirion.h> | |
| #define lcdTxPin 2 | |
| #define sensorDataPin 3 | |
| #define sensorClockPin 4 | |
| float temperature; |
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
| # This is the file that Capistrano uses to get our code onto the servers | |
| # See http://capify.org for more info | |
| require 'bundler/capistrano' | |
| require 'delayed/recipes' | |
| # require 'hoptoad_notifier/capistrano' | |
| # capistrano-ext lets you configure for multiple environments, see config/deploy/qa.rb | |
| set :stages, %w(qa staging production unicorn) | |
| set :default_stage, 'qa' |
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
| static VALUE | |
| rb_str_each_line(int argc, VALUE *argv, VALUE str) | |
| { | |
| rb_encoding *enc; | |
| VALUE rs; | |
| unsigned int newline; | |
| const char *p, *pend, *s, *ptr; | |
| long len, rslen; | |
| VALUE line; | |
| int n; |
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 'json' | |
| require 'httparty' | |
| require 'cgi' | |
| base_url = 'http://api.amp.active.com/search?f=activities&v=json&api_key=KEY_GOES_HERE' | |
| sports = %w{Baseball Basketball Football Golf Outdoors Running Walking} | |
| system('clear') | |
| puts "------------------------------------------" | |
| puts " Active.com Search" |
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
| # application_helper.rb | |
| def dark_feature(key, &block) | |
| if dark_feature_enabled? key | |
| content_tag('div', :class => "feature #{key}", &block) | |
| end | |
| end | |
| def dark_feature_enabled?(key) | |
| if feature = DarkFeature.find_by_key(key) | |
| return feature.enabled? |