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
| jroes work$ rhc app create -a railsapp2 -t ruby-1.9 && rhc cartridge add -a railsapp2 -c mysql-5.1 && cd railsapp2 && git remote add upstream -m master git://github.com/openshift/rails-example.git && git pull -s recursive -X theirs upstream master | |
| Password: ************** | |
| Creating application 'railsapp2' | |
| ================================ | |
| Namespace: skookum | |
| Cartridge: ruby-1.9 | |
| Gear Size: default | |
| Scaling: no |
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
| GIT | |
| remote: git://github.com/spree/spree-multi-domain | |
| revision: 9b2e7c71f62fc514d8624515a168c44c5353208c | |
| specs: | |
| spree_multi_domain (1.0.0) | |
| spree_core (~> 1.2) | |
| GIT | |
| remote: git://github.com/spree/spree_auth_devise | |
| revision: 887dba92d5075550b38e947ddd5bfa384932c942 |
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
| module ActiveAdmin | |
| class FormBuilder < ::Formtastic::FormBuilder | |
| # ... | |
| # The input method returns a properly formatted string for | |
| # its contents, so we want to skip the internal buffering | |
| # while building up its contents | |
| def input(method, *args) | |
| content = with_new_form_buffer { super } | |
| return content.html_safe unless @inputs_with_block |
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
| var mongoose = require('./../mongoose'); | |
| console.error( | |
| '\n===========' | |
| , ' mongoose version: ' | |
| , mongoose.version | |
| , '========\n\n' | |
| ); | |
| var Schema = mongoose.Schema; |
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
| -module(bot). | |
| -author("[email protected]"). | |
| -export([connect/2, loop/1]). | |
| -define(nickname, "jroes-test"). | |
| -define(channel, "#jroes-test"). | |
| % Connect to an IRC server with a given Host and Port. Set up the TCP option to | |
| % give us messages on a line-by-line basis. | |
| connect(Host, Port) -> | |
| {ok, Sock} = gen_tcp:connect(Host, Port, [{packet, line}]), |
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
| #!/bin/bash | |
| # | |
| # Adds a shell alias `beep` that plays the "Work Complete!" sound from Warcraft 2 on OSX via afplay. | |
| # | |
| # Just add `&& beep` to the end of any long-running CLI process. Useful if you aren't a Growl user. | |
| # | |
| # rake db:reset && rake db:test:prepare && beep # => You'll hear "Work Complete!" when it's done. | |
| # | |
| # Jon Roes <[email protected]> |
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
| When /^I fill in "([^\"]*)" within "([^\"]*)" with "([^\"]*)"$/ do |field, parent, value| | |
| within(parent) do | |
| fill_in(field, :with => value) | |
| 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
| irb(main):010:0> @trip.stops | |
| ~ (0.000097) SELECT "id", "trip_id", "place_id" FROM "stops" WHERE "trip_id" = 19 ORDER BY "id" | |
| => [#<Stop @id=28 @trip_id=19 @place_id=28>, #<Stop @id=29 @trip_id=19 @place_id=29>, #<Stop @id=30 @trip_id=19 @place_id=30>] | |
| irb(main):011:0> @trip.stops[-1..1] | |
| => [] | |
| #expected last 2: | |
| => [#<Stop @id=29 @trip_id=19 @place_id=29>, #<Stop @id=30 @trip_id=19 @place_id=30>] |
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 'net/dns/resolver' | |
| DEFAULT_SERVERS = [ 'dnsbl.ahbl.org' ] | |
| module Rack | |
| class RBL | |
| # List of RBL servers to check against | |
| attr_accessor :servers | |
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 Object | |
| def method(m) | |
| `grep -Rn "def #{m}" .` | |
| end | |
| def classmethod(m) | |
| `grep -Rn "def self.#{m}" .` | |
| end | |
| end |