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
| package safebuffer | |
| import ( | |
| "bytes" | |
| "sync" | |
| ) | |
| // Buffer is a goroutine safe bytes.Buffer | |
| type Buffer struct { | |
| buffer bytes.Buffer |
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
| _..--""---. | |
| / ". | |
| ` l | |
| |'._ ,._ l/"\ | |
| | _J<__/.v._/ | |
| \( ,~._,,,,-) | |
| `-\' \`,,j| | |
| \_,____J | |
| .--.__)--(__.--. | |
| / `-----..--'. j |
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
| #!/usr/bin/env bash | |
| # Install cardano-cli or use docker https://gist.github.com/ilyar/bf4c2346be1a74c50e488181986808fb | |
| # | |
| # Linux https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-linux/latest-finished | |
| # Win64 https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-win64/latest-finished | |
| # Macos https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-macos/latest-finished | |
| # Extcact only cardano-cli into /usr/local/bin/cardano-cli | |
| # Check | |
| cardano-cli --version |
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/bash | |
| if [ -d ".git" ]; then | |
| echo "git repo detected" | |
| echo "checking out $1..." | |
| git checkout $1 | |
| echo "fetching origin $1..." | |
| git fetch origin $1 | |
| echo "merging origin $1 to local $1..." | |
| git merge origin/$1 | |
| echo "done" |
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/bash | |
| # Run `nvm use` when changing into directory if the .nvmrc exists | |
| function cd() { | |
| builtin cd "$@" | |
| if [[ -e .nvmrc ]] | |
| then | |
| nvm use | |
| fi |
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
| ls -v | cat -n | while read n f; do mv -n "$f" "$n.ext"; done |
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
| package main | |
| import ( | |
| "net/http" | |
| ) | |
| func redirect(w http.ResponseWriter, req *http.Request) { | |
| http.Redirect(w, req, | |
| "https://" + req.Host + req.URL.String(), | |
| http.StatusMovedPermanently) | |
| } |
OlderNewer