Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefano Zacchiroli zacchiro

View GitHub Profile
View list-unimplemented.sh
#!/bin/bash
cards=$(mktemp --tmpdir tmp.throneteki-list-unimplemented.XXXXXXXXXX)
trap "rm -f ${cards}" EXIT
grep -rhoE "'([0-9]{5})'" server/game/cards/ | sort | grep -rhoE "'([0-9]{5})'" server/game/cards/ | tr -d "'" > "$cards"
mongo --quiet throneteki <<EOF
var file = cat('$cards')
var keywordOnlyCards = ['01070', '01072', '01085', '01091', '01132', '01168']
var bannerCards = ['01198', '01199', '01200', '01201', '01202', '01203', '01204', '01205']
var titleCards = ['01206', '01207', '01208', '01209', '01210', '01211']
var words = file.split('\n').concat(keywordOnlyCards).concat(bannerCards).concat(titleCards)
View find-unimplemented.sh
#!/bin/bash
cards_dir='./server/game/cards'
if [ -z "$1" ] ; then
echo "Usage: find-unimplemented THRONESDB_DECK.txt"
exit 1
fi
deck="$1"
shift
View gist:4d94da1ee4f343fa0f12
### Keybase proof
I hereby claim:
* I am zacchiro on github.
* I am zacchiro (https://keybase.io/zacchiro) on keybase.
* I have a public key whose fingerprint is 4900 707D DC5C 07F2 DECB 0283 9C31 503C 6D86 6396
To claim this, I am signing this object: