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
forksync() { | |
if [ ! -d ".git" ]; then | |
echo "Make sure your in the root of a github repo." | |
return | |
fi | |
if cat .git/config | grep -q 'remote "upstream"' .git/config; then | |
git add . | |
git stash | |
git fetch upstream | |
git rebase upstream/master |
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
forkwipe () { | |
if [ ! -d ".git" ]; then | |
echo "Make sure your in the root of a github repo." | |
return | |
fi | |
if cat .git/config | grep -i -q 'remote "upstream"' .git/config; then | |
git fetch upstream | |
git checkout master | |
git reset --hard upstream/master | |
git push origin master --force |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
) | |
var send = make(chan string) |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"strconv" | |
"time" | |
) |