(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
papertrail.rake to lib/tasksremote_syslog.yml to config/before_restart.rb to deploy/PAPERTRAIL_PORT ENV var to the one provided by Papertrail for your systemInspiration from Scott W. Bradley
| require 'net/http' | |
| # WARNING do not use this; it works but is very limited | |
| def resolve url | |
| res = Net::HTTP.get_response URI(url) | |
| if res.code == '301' then res['location'] | |
| else url.to_s | |
| end | |
| end |
| require "etc" | |
| require "thread" | |
| Enumerator.class_eval do | |
| # Process an enumerator using a simple thread pool | |
| # | |
| # `of:` is pool size, defaults to detecting number of CPUs | |
| # | |
| # Caveat: Enumerator#map may yield results out of order. Work is processed in | |
| # order, but apparently #map concatenates the results however it likes. This |
| /* Build this with: | |
| * gcc desktopsearch.m -o desktopsearch -ObjC -framework Cocoa | |
| */ | |
| #include <Cocoa/Cocoa.h> | |
| int main(int argc, char** argv) { | |
| NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
| if (argc == 2) { |
| # minimal rails3 app | |
| require 'action_controller' | |
| Router = ActionDispatch::Routing::RouteSet.new | |
| Router.draw do | |
| root :to => 'site#index' | |
| end | |
| class SiteController < ActionController::Metal |
| if ENV['RAILS_ENV'] && !defined?(RAILS_ENV) | |
| Object.const_set("RAILS_ENV", ENV['RAILS_ENV']) | |
| end | |
| # Require any additional compass plugins here. | |
| require 'grid-coordinates' | |
| require 'compass-fancybox-plugin' | |
| require 'susy' | |
| project_type = :rails |