This file contains 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
# Substitute path/version of hadoop files below | |
# Note: this will create a directory ./build/test/data/dfs/ to store your HDFS file system in. Clean this up when you're done. | |
HADOOP_CLASSPATH=/usr/local/Cellar/hadoop/2.4.0/libexec/share/hadoop/yarn/test/hadoop-yarn-server-tests-2.4.0-tests.jar hadoop jar /usr/local/Cellar/hadoop/2.4.0/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.4.0-tests.jar minicluster --nnport=8020 |
This file contains 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 'ostruct' | |
def thing | |
OpenStruct.new(foo: 'FOO') | |
end | |
context 'foo' do | |
it 'returns foo' do | |
expect(thing.foo).to eq('FOO') | |
end |
This file contains 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
(defn fizz-buzz-n | |
[n] | |
(or | |
(and (zero? (mod n 15)) "FizzBuzz") | |
(and (zero? (mod n 3)) "Fizz") | |
(and (zero? (mod n 5)) "Buzz") | |
n)) | |
(println (clojure.string/join "\n" | |
(->> (take 25 (iterate inc 1)) |
This file contains 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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'blather/client' | |
setup 'moderator@enterprise-g.local', 'moderator' | |
message :chat? do |m| | |
puts m.read_content(:meeting) | |
end |
This file contains 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 Category < ActiveRecord::Base | |
has_many :assignments, :foreign_key => 'category_uuid', :primary_key => 'uuid' | |
end | |
class Post < ActiveRecord::Base | |
has_many :assignments, :foreign_key => 'post_uuid', :primary_key => 'uuid' | |
end | |
class Assignment < ActiveRecord::Base | |
belongs_to :post, :foreign_key => 'uuid', :primary_key => 'post_uuid' |
This file contains 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
### IMPORTANT NOTE: See the comment thread below for a more concise way to determine this now, using has_css... | |
#A better 'I should not see' for Capybara that lets jQuery determine visibility of the text you're looking for. | |
Then /^"([^\"]*)" should not be visible$/ do |text| | |
finder_script = %{ | |
function is_text_visible_on_page(text) { | |
var match = false; | |
$('*:visible') |
This file contains 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
LabelForNestedStories AnotherLabel | |
- Feature title (single line description in parens) | |
- Some other feature (you don't need blank lines seperating your stories but you can use them for extra readability in the file) | |
- Another feature | |
Multi-line description of this feature. | |
Use two tabs to indent for easy visual parsing. | |
[] Chores look like checkboxes (short description in parens) |
This file contains 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
grammar PivotalStories | |
rule stories | |
story* | |
end | |
rule story | |
feature* | |
end | |
rule feature |
This file contains 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
LabelOne LabelTwo | |
- feature one (description one) | |
- feature two (description two) | |
- feature three with multiline desc following | |
desc line 1 | |
desc line 2 | |
desc line 3 |
This file contains 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
Autotest.add_hook :initialize do |at| | |
at.add_mapping(%r%^spec/integration/.*_spec.rb$%, true) { |filename, _| | |
filename | |
} | |
at.add_mapping(%r%^app/(models|controllers|helpers|lib)/.*rb$%, true) { | |
at.files_matching %r%^spec/integration/.*_spec.rb$% | |
} | |
at.add_mapping(%r%^app/views/(.*)$%, true) { |
OlderNewer