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/sh | |
# | |
# This hook prevents you from committing any file containing "debugger". | |
# | |
# To enable this hook, rename this file to ".git/hooks/pre-commit". | |
DIFF_FILES=`git diff-index HEAD --cached --name-only` | |
if [ $? -ne 0 ] | |
then |
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
dates = thing.order("created_at DESC").map(&:created_at) | |
longest = 1 | |
streaks = [] | |
return 0 if dates.nil? || dates.empty? | |
dates.each_with_index do |d, idx| | |
unless (idx == dates.size - 1) | |
d1 = dates[idx] |