You wrote:
= hb 'if content.condition1' do
= hb 'if content.condition2' do
%p Some paragraph
= hb 'else'
%p another paragraph
= hb 'else'
%p third paragraph
require 'json' | |
require 'open-uri' | |
class DependencyChecker | |
def initialize(*gems) | |
@gems = gems.flatten | |
@dep_cache = {} | |
end | |
def all_dependencies |
# Mongoid association matchers for RSpec 2.x and 1.x | |
# | |
# Save this file to your spec/support directory | |
# | |
# Usage: | |
# | |
# describe User do | |
# it { should reference_one :profile } | |
# end | |
# |
#!/usr/bin/env sh | |
source "$HOME/.rvm/scripts/rvm" | |
rvm default | |
__rvm_load_rvmrc | |
cd . | |
export BUNDLE_PATH=$GEM_HOME | |
exec ruby "$@" |
wget http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
wget http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem | |
gem install linecache19-0.5.13.gem | |
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$HOME/.rvm/src/ruby-1.9.3-p0 | |
OR if Falcon the last one is use the one below (or whatever) | |
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$HOME/.rvm/src/ruby-1.9.3-p0-falcon | |
module GGeocode | |
### ref: http://code.google.com/apis/maps/documentation/geocoding/ | |
GGeocode::Version = '0.0.3' | |
def GGeocode.version | |
GGeocode::Version | |
end | |
require 'net/http' |
You wrote:
= hb 'if content.condition1' do
= hb 'if content.condition2' do
%p Some paragraph
= hb 'else'
%p another paragraph
= hb 'else'
%p third paragraph
#!/usr/bin/env ruby | |
require "date" | |
class Fixnum | |
Date::MONTHNAMES[1..-1].each_with_index do |month, index| | |
define_method month.downcase do |year| | |
Date.new(year, index+1, self) | |
end | |
end | |
end |
scope '/api' do | |
resources :users, except: [:edit] | |
end | |
root to: 'ember#index' | |
get '*path' => 'ember#index' |
namespace :db do | |
namespace :migrate do | |
desc "Re-run a migration that's already been run" | |
task :rerun => [:environment, :load_config] do | |
class ActiveRecord::Migrator | |
def rerun | |
target = migrations.detect { |m| m.version == @target_version } | |
raise UnknownMigrationVersionError.new(@target_version) if target.nil? | |
target.migrate(:up) | |
end |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import classNames from 'classnames'; | |
const ANIMATION_DURATION = 1000; | |
class BatchDropZone extends React.Component { | |
static propTypes = { |