This script will install ruby-debug19 under your current Ruby 1.9.3 environment.
- rbenv
| h = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) } | |
| h[:a][:b][:c] = "123" | |
| h # => {:a=>{:b=>{:c=>"123"}}} |
| vim -d old.rb new.rb +:TOhtml +:x +:qa |
| /** | |
| * Anita Ammersfeld | |
| */ | |
| a.box { | |
| display: inline-block; | |
| position: relative; | |
| border-top: 1px dashed black; | |
| border-right: 1px dashed black; | |
| cursor: pointer; |
| find ~/Library/LaunchAgents/*mysql* | xargs launchctl load | |
| find ~/Library/LaunchAgents/*mysql* | xargs launchctl unload |
| exec = require('child_process').exec | |
| fs = require('fs') | |
| Array::remove = (e) -> @[t..t] = [] if (t = @indexOf(e)) > -1 | |
| Array::include = (e) -> @indexOf(e) > -1 | |
| config = | |
| # All files are compiled in the order you like into following ".js" file. | |
| output: 'public/javascripts/app.js' |
| class MiniTest::Mock | |
| alias_method :__verify, :verify | |
| undef :verify | |
| end | |
| mock = MiniTest::Mock.new | |
| # call :verify on mock object | |
| # ... |
| /* Click open/close Dropdown in pure CSS */ | |
| /* Disclaimer: Not the most semantic | |
| thing in the universe. */ | |
| /* Forked from original idea | |
| http://jsfiddle.net/paullferguson/Sv54G/3/ */ | |
| .tabs { | |
| position: relative; |
| class ActionView::Template | |
| module Handlers | |
| class Excel | |
| def call(template) | |
| %{ | |
| Tempfile.open('writeexcel').tap do |tmp| | |
| WriteExcel.new(tmp.path).tap do |workbook| | |
| #{template.source} | |
| end.close | |
| end.tap(&:rewind).read |