Skip to content

Instantly share code, notes, and snippets.

View anildigital's full-sized avatar
:octocat:

Anil Wadghule anildigital

:octocat:
View GitHub Profile
class Person
class << self
class << self
def hi
puts "Hi"
end
end
end
def self.hi
self.self_obj.hi
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__'
@anildigital
anildigital / gist:28382
Created November 24, 2008 04:56 — forked from lifo/gist:23541
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)
(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)
;
@anildigital
anildigital / .vimrc
Created November 26, 2008 20:59 — forked from defunkt/.vimrc
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
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
WiFi Security
Usr WPA 2 personal than WEP
# 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))
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
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