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
| # This is not my code, I took it from https://blog.arkency.com/10-lessons-learnt-from-the-ruby-refactoring-kata-tennis-game/. | |
| # I'd advise not clicking through to that link since it shows some refactoring. | |
| require 'minitest/autorun' | |
| class TennisGame1 | |
| def initialize(player1Name, player2Name, p1Points, p2Points) | |
| @player1Name = player1Name | |
| @player2Name = player2Name |
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 'csv' | |
| ATTENDEE_CSV = 'Attendees.csv' | |
| BADGE_CSV_OUTPUT = 'Badges.csv' | |
| AttendeeStruct = Struct.new(:last_name, | |
| :first_name, | |
| :ticket_type, | |
| :discount_code, | |
| :twitter, |
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 | |
| # A simple script which will name the window in iTerm | |
| # usage: | |
| # $ namewindow New window name | |
| echo -ne "\033]2;"$@"\007" |
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
| 1 pound Brussels sprouts | |
| 3 Tb olive oil | |
| Salt & freshly ground black pepper | |
| 1/2 cup chopped hazelnuts | |
| 2 Tbsp soy sauce | |
| 1 Tbsp garlic | |
| 2 cups chopped shallots | |
| grated carrot |