I live in Manhattan.
Email me: [email protected]
Call me: 347.583.9602
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
(function() { | |
var HomeController, app, routes; | |
HomeController = { | |
index: function() { | |
return $('#main').text('Welcome!'); | |
} | |
}; | |
routes = function() { | |
return this.get('#/', HomeController.index); | |
}; |
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 Array | |
def make_flat | |
flat_array = [] | |
self.each do |element| | |
if element.respond_to? :make_flat | |
flat_array += element.make_flat | |
else | |
flat_array << element | |
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
def my_reverse( a ) | |
#... fill in this code | |
end | |
a = [1,2,3,4] | |
b = my_reverse a | |
puts b.inspect | |
#==> [4, 3, 2, 1] |
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
def my_reverse( a ) | |
reversed = [] | |
length_a = a.length | |
for counter in Array.new( length_a ) | |
last = a.pop | |
reversed.push( last ) | |
end | |
reversed | |
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
-bash: /Users/mparker/.rvm/scripts/selector: line 202: syntax error near unexpected token `(' | |
-bash: /Users/mparker/.rvm/scripts/selector: line 202: ` if [[ -z "${rvm_ruby_version:-""}" ]] (( rvm_head_flag == 0 ))' | |
-bash: /Users/mparker/.rvm/scripts/selector: line 202: syntax error near unexpected token `(' | |
-bash: /Users/mparker/.rvm/scripts/selector: line 202: ` if [[ -z "${rvm_ruby_version:-""}" ]] (( rvm_head_flag == 0 ))' |
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
get "/", {}, "HTTP_HOST" => "example.org:9000" | |
last_request.port.should == 9000 | |
get "/", {}, "SERVER_PORT" => "9000" | |
last_request.port.should == 9000 | |
header "Host", "example.org:9000" | |
get "/" | |
last_request.port.should == 9000 |
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
ruby-1.8.7-p334 :001 > require 'yaml' | |
=> true | |
ruby-1.8.7-p334 :002 > YAML.load File.read(".travis.yml") | |
=> {"before_script"=>"echo 'before start' && sed -i '' -e 's/admin:password\\@//' features/support/env.rb && echo 'before end'", "rvm"=>["1.8.7", "1.9.2", "1.9.3", "rbx-2.0", "ree"]} |
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
# | |
# Feature: Test How Spinach Works | |
# | |
# Scenario: Test triple equals | |
# Given I have an empty array: | |
# """ | |
# @array = [] | |
# """ | |
# | |
# Then it should be empty: |
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
Scenario: Valid tweet | |
Given there is a user "bob" with password "password" | |
And there is a user "alice" with password "password" | |
And I visit "/" | |
And I fill in "username" with "bob" | |
And I fill in "password" with "password" | |
And I click "Log in" | |
When I fill in "Tweet" with "this is a test tweet noise noise noise noise noise noise noise noise noise noise noise noise noise noise noise noise haha I'm less than 140 characters." | |
And I click "Submit" | |
Then I should see "Your tweet was submitted" |