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
#!/bin/bash | |
# Helper funcs usually not used directly | |
git-mainbranch() { git ls-remote --symref origin HEAD | awk -F'[/\t]' 'NR == 1 {print $3}'; } | |
git-fixup() { git commit --fixup HEAD; } | |
git-fixup-all() { git add -A && git commit --fixup HEAD; } | |
git-autosquash() { GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash ${1:-origin/$(git-mainbranch)}; } | |
# Easy shortcut to take all current changes and fix them up into the previous commit | |
auto-fixup() { git-fixup-all; git-autosquash; } |
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
def score(dice) | |
score=0 | |
# find first group of 3 and add score. Break out if we find one since | |
# you can't have 2 groups of 3 with only 5 dice. | |
for outcome in (1..6) | |
if dice.count(outcome) >=3 | |
score += outcome == 1 ? 1000 : 100 * outcome | |
# Remove the 3 items we matched. |
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
Name: perl-Carton-Glue | |
Version: 0.1 | |
Release: 2%{?dist} | |
Summary: Make Carton work on CentOS 7's system perl | |
BuildArch: noarch | |
License: MIT | |
%description | |
CentOS 7 moves it's core modules out of the core path and into vendor_perl. |
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
ln -sf /usr/lib64/perl5/vendor_perl/Bundle /usr/lib64/perl5/Bundle | |
ln -sf /usr/lib64/perl5/vendor_perl/Class /usr/lib64/perl5/Class | |
ln -sf /usr/lib64/perl5/vendor_perl/Compress /usr/lib64/perl5/Compress | |
ln -sf /usr/lib64/perl5/vendor_perl/Crypt /usr/lib64/perl5/Crypt | |
ln -sf /usr/lib64/perl5/vendor_perl/Cwd.pm /usr/lib64/perl5/Cwd.pm | |
ln -sf /usr/lib64/perl5/vendor_perl/Data /usr/lib64/perl5/Data | |
ln -sf /usr/lib64/perl5/vendor_perl/DBD /usr/lib64/perl5/DBD | |
ln -sf /usr/lib64/perl5/vendor_perl/DB_File.pm /usr/lib64/perl5/DB_File.pm | |
ln -sf /usr/lib64/perl5/vendor_perl/DBI /usr/lib64/perl5/DBI | |
ln -sf /usr/lib64/perl5/vendor_perl/DBI.pm /usr/lib64/perl5/DBI.pm |