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 Person | |
| class << self | |
| class << self | |
| def hi | |
| puts "Hi" | |
| end | |
| end | |
| end | |
| def self.hi | |
| self.self_obj.hi |
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
| 9 tests, 154 assertions, 0 failures, 0 errors | |
| Loaded suite test/initializer_test | |
| Started | |
| ..............F.......... | |
| Finished in 0.51216 seconds. | |
| 1) Failure: | |
| test_config_defaults_and_settings_should_be_added_to_i18n_defaults(InitializerSetupI18nTests) | |
| [test/initializer_test.rb:299:in `test_config_defaults_and_settings_should_be_added_to_i18n_defaults' | |
| /opt/local/lib/ruby/gems/1.8/gems/mocha-0.9.2/lib/mocha/test_case_adapter.rb:69:in `__send__' |
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 'ruby-prof' | |
| RubyProf.measure_mode = RubyProf::PROCESS_TIME | |
| RubyProf.start | |
| require 'config/environment' | |
| results = RubyProf.stop | |
| File.open "loading-graph.html", 'w' do |file| | |
| RubyProf::GraphHtmlPrinter.new(results).print(file) |
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
| (autoload 'js2-mode "js2" nil t) | |
| (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
| ; js2 | |
| ; (autoload 'js2-mode "js2" nil t) | |
| ; (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
| ; | |
| ; ; js-shell | |
| ; (autoload 'javascript-shell "javascript-mode" nil t) | |
| ; |
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
| set foldmethod=syntax | |
| set foldlevelstart=1 | |
| set foldnestmax=5 | |
| let javaScript_fold=1 | |
| set textwidth=0 | |
| "set foldclose=all | |
| "colorscheme torte | |
| " os x backspace fix |
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
| Google Calendar API: | |
| http://www.google.com/calendar/event? | |
| action=TEMPLATE | |
| &text=BANDNAME @ VENUE | |
| &dates=STARTDATE/ENDDATE | |
| &location=VENUE | |
| &details=FULL BAND LIST | |
| &trp=false | |
| &sprop=LINK TO LMS GIG PAGE | |
| &sprop=name:LEEDS MUSIC SCENE |
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
| WiFi Security | |
| Usr WPA 2 personal than WEP | |
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
| # Confreaks - RubyConf2008 Videos downloader script | |
| # | |
| # Author: Anil Wadghule | |
| # | |
| require 'open-uri' | |
| files_path = "http://rubyconf2008.confreaks.com/videos/" | |
| downloadable_file_name_array = [] | |
| data = Net::HTTP.get(URI.parse(files_path)) |
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 "benchmark" | |
| Benchmark.bm do |x| | |
| 5.times do | |
| x.report do | |
| o = Object.new | |
| 10000.times do | |
| def o.method; end | |
| end | |
| 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
| Useful ImageMagick helpers | |
| convert netvibes_1.jpg xc:transparent -font Bookman-DemiItalic -pointsize 72 -draw "text 20, 55 'Anil Wadghule'" -channel RGBA -fill darkred -stroke magenta -draw "text 20, 55 'Anil Wadghule'" newmagick.jpg |