Skip to content

Instantly share code, notes, and snippets.

View jpowell's full-sized avatar

Justin Powell jpowell

View GitHub Profile
@jpowell
jpowell / fizzbuzz.rb
Created November 5, 2013 21:08
FizzBuzz
SPECIAL_MODS = [[3, 'Fizz'], [5, 'Buzz']]
(1..100).each do |i|
output = SPECIAL_MODS.reduce([]) { |a, (n, s)| a.push(s) if i % n == 0; a }
puts output.empty? ? i : output.join
end
@jpowell
jpowell / changelog.sh
Last active January 14, 2025 19:16 — forked from gburgett/changelog.sh
generates a changelog from git history, grabbing PRs from github
#! /bin/bash
COLOR_NC='\033[0m' # No Color
COLOR_LIGHT_GREEN='\033[1;32m'
COLOR_GRAY='\033[1;30m'
COLOR_RED='\033[0;31m'
logv() {
[[ ! -z "$VERBOSE" ]] && >&2 echo -e "${COLOR_GRAY}$*${COLOR_NC}"
}