This script will install ruby-debug19
under your current Ruby 1.9.3
environment.
- rbenv
require 'active_support/all' | |
module BeforeEach | |
extend ActiveSupport::Concern | |
module InstanceMethods | |
def before_each | |
raise NotImplementedError('Please define before_each method') | |
end | |
end |
gem list --no-versions | grep \w* | xargs gem uninstall |
osascript -e 'tell application "Mail" to make new outgoing message with properties { Content: do shell script "ls", visible: true }' -e 'tell application "Mail" to activate' |
class Chat < ActiveRecord::Base | |
has_many :user_chats, conditions: { bbc: false } | |
has_many :bbc_user_chats, class_name: 'UserChat', conditions: { bbc: true } | |
has_many :users, through: :user_chats | |
has_many :bbc_users, through: :bbc_user_chats, source: :user | |
end |
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 |
/* 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 MiniTest::Mock | |
alias_method :__verify, :verify | |
undef :verify | |
end | |
mock = MiniTest::Mock.new | |
# call :verify on mock object | |
# ... |
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' |