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
| test "don't do unnecessary work for no change" do | |
| # let's assume that there's an enqueue(evt) method which pulls an event into the | |
| # processing pipeline, and that the enqueue method in turn calls a process(evt) method | |
| # let's further assume that if an event has an attribute, once processed, we don't want | |
| # to process it again for the same attribute value. so evt(attr:5), evt(attr:5), evt(attr:6) would | |
| # generate two process() calls, not three. | |
| pipeline = Pipeline.new() # or whatever |
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
| #!/usr/bin/env bash | |
| # given a single case id (e.g., 19820427023459I) will check to see if | |
| # it exists in the output directory, otherwise fetch it -- | |
| # it won't store the file if there's a problem with the request | |
| # usage: ./fix-missing.sh <case_id> | |
| if [ `ls out/${1}.html 2> /dev/null` ]; then | |
| exit | |
| else |
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
| // more javascripty! | |
| const FRIENDLY = { | |
| MAYBE: 'pet at your own risk', | |
| YES: 'ok to pet', | |
| NO: 'do NOT pet' | |
| } | |
| class Pet { | |
| constructor(name, isFriendly = FRIENDLY.MAYBE, sound = "UNKNOWN") { |
OlderNewer