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
| after_save do |my_model| | |
| self.class_eval do | |
| # my_model.job_owner_type => "AnotherModel" | |
| alias_method my_model.job_owner_type.underscore.to_sym, :job_owner | |
| end | |
| 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
| [tony@server ~]$ rvmsudo rvm get latest --auto | |
| Original installed RVM version: | |
| rvm 1.9.2 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/] | |
| /tmp/26590: line 28: [: !=: unary operator expected | |
| You already have the latest version! | |
| RVM reloaded! |
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 'ruby-processing' | |
| class Cubey< Processing::App | |
| #load_libraries 'boids', 'opengl' | |
| load_libraries 'opengl' | |
| import "processing.opengl" if library_loaded? "opengl" | |
| #def setup_opengl | |
| # render_mode(OPENGL) | |
| #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
| # encoding: utf-8 | |
| require 'yaml' | |
| require 'find' | |
| require 'mini_magick' | |
| # slurp up .erb files in blog/ | |
| # parse the yaml frontmatter | |
| # generate views in views/blog/ | |
| # populate the articles array | |
| # article |
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
| #!/bin/bash | |
| FFMPEG=`which ffmpeg` | |
| if [ "$FFMPEG" = "" ] ; then | |
| echo "Please install ffmpeg."; | |
| exit 0; | |
| fi | |
| if [ $# != 3 ] ; then | |
| echo "Usage: $0 <image_file> <mp3_file> <output_file.avi>"; | |
| exit 0; |
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
| █▓▒░tony@kiwi░▒▓█ ~/src/ruby-processing(master)$ rvm use jruby-1.6.3 | |
| Using /home/tony/.rvm/gems/jruby-1.6.3 | |
| █▓▒░tony@kiwi░▒▓█ ~/src/ruby-processing(master)$ gem install chronic | |
| Fetching: chronic-0.8.0.gem (100%) | |
| Successfully installed chronic-0.8.0 | |
| 1 gem installed | |
| █▓▒░tony@kiwi░▒▓█ ~/src/ruby-processing(master)$ irb | |
| => Unable to load pry | |
| jruby-1.6.3 :001 > require 'chronic' | |
| LoadError: no such file to load -- chronic |
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
| █▓▒░tony@kiwi░▒▓█ ~/src/ruby-processing(master)$ ls /home/tony/.rvm/gems/jruby-1.6.3/gems/ | |
| aasm-2.2.0 ansi-1.3.0 i18n-0.5.0 paperclip-2.3.16 railties-3.0.10 | |
| abstract-1.0.0 arel-2.0.10 jquery-rails-1.0.13 polyglot-0.3.2 rake-0.8.7 | |
| actionmailer-3.0.10 builder-2.1.2 jruby-launcher-1.0.8-java progressbar-0.9.1 rake-0.9.2 | |
| actionpack-3.0.10 bundler-1.0.21 jruby-launcher-1.0.9-java rack-1.2.3 rdoc-3.9.2 | |
| activemodel-3.0.10 cocaine-0.2.0 mail-2.2.19 rack-mount-0.6.14 ruby-prof-0.10.8 | |
| activerecord-3.0.10 erubis-2.6.6 mime-types-1.16 rack-test-0.5.7 thor-0.14.6 | |
| activeresource-3.0.10 exception_notification-2.4.1 mysql2-0.2.13 rails-3.0.10 treetop-1.4.10 | |
| activesupport-3.0.10 factory_girl-2.0.4 |
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 'rubygems' | |
| require 'oauth' | |
| require 'json' | |
| CONSUMER_KEY = 'xxxxxxxx' | |
| CONSUMER_SECRET = 'xxxxxxxx' | |
| OAUTH_TOKEN = 'xxxxxxxx' | |
| OAUTH_SECRET = 'xxxxxxxx' | |
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
| http://en.wikipedia.org/wiki/List_of_Home_Movies_episodes | |
| "can star wars do THIS?" - Brendon, S2E5 "The Party" | |
| "i know a kid...a guy that makes movies" - McGuirk, S4E5, "Wizard's Baker" | |
| "you guys!" - melissa in every episode |
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
| 174.31.173.110 - - [16/Dec/2012 17:08:53] "GET /js/libs/modernizr-2.0.6.js HTTP/1.0" 200 - 0.0017 | |
| E, [2012-12-16T17:08:53.568260 #12145] ERROR -- : app error: /var/www/datafruits.fm/releases/20121217010420/assets/js/libs/modernizr-2 | |
| .0.6.js has a invalid US-ASCII byte sequence (Sprockets::EncodingError) | |
| E, [2012-12-16T17:08:53.568409 #12145] ERROR -- : /var/www/datafruits.fm/shared/bundle/ruby/1.9.1/gems/sprockets-2.0.4/lib/sprockets/u | |
| tils.rb:18:in `block in read_unicode' |