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
package main | |
/* | |
Run via `go run main.go` | |
Test via `curl -i localhost:4000` | |
Load test via https://github.com/rakyll/hey | |
hey -n 500000 -c 50 -q 166 -m GET http://localhost:4000 | |
Summary: |
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/env ruby | |
# Convert a FlyBuys card number to a barcode | |
def get_check_sum_from_thirteen_digit_code(card_number) | |
evens = 0 | |
odds = 0 | |
# Loop over all characters | |
card_number.chars.each_with_index do |character, index| | |
# Don't include the last character - 1 |
OlderNewer