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
/* | |
Liquid Democracy | |
Uses a token as voting weight, you can delegate that weight to anyone as your representative. | |
They can also delegate to other people, and this cycles until someone with more votes is apointed. | |
The person with more votes gets to execute any transaction in this contract's name. | |
Useful if the liquid democracy is set as `owner` of some other contract. | |
*/ |
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 | |
regexp=".*-([A-Z].*-[0-9]*)" | |
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') | |
if [[ "$branch" =~ $regexp ]]; then | |
refs_id=${BASH_REMATCH[1]} | |
if [ "$2" = message ]; then | |
echo -ne "\n${refs_id}" >> "$1" | |
else | |
sed -i "1s/^$/\n\n${refs_id}/g" "$1" |