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
// ReaderFanOut allows multiple consumers of one io.Reader. | |
// all consumers are run concurrently (in go threads) but will process | |
// the reading sequentially; this means that if a consumer stops consuming | |
// the reader it will block other consumers. | |
// If a consumer returns the it's reader is automatically drained to avoid | |
// stalling other consumers. If any consumer returns a non nil error the | |
// context for all other consumers is cancelled and the first error is returned. | |
func ReaderFanOut( | |
ctx context.Context, | |
source io.Reader, |
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
CREATE TEMP FUNCTION BigQuerySchemaToJsonSchema(src STRING) | |
RETURNS STRING LANGUAGE js AS """ | |
let expandStrRep = function(subStr){ | |
let pairs = [] | |
let position = 0 | |
let carrotOffset = 0 | |
let state = "col_name" | |
let pair = [] | |
for(i=0; i<subStr.length; i++){ | |
if (state == "col_name" && subStr[i] == " "){ |
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
org="whitehouse" | |
for repo in $(curl -v -s "https://api.github.com/orgs/$org/repos?per_page=100&type=sources" 2>&1 | grep '"full_name": "*"' | cut -d':' -f2 | sed s'/,$//' | sed s'/"//g' ); do | |
filename=$(echo "$repo" | cut -d'/' -f2) | |
echo "Downloading $repo..." | |
curl -o "$filename.zip" -L "https://github.com/$repo/archive/master.zip" | |
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
Note : Proxmox 6.1 | |
VI : /etc/apt/sources.list | |
# security updates | |
deb http://security.debian.org jessie/updates main contrib | |
# PVE pve-no-subscription repository provided by proxmox.com, | |
# NOT recommended for production use | |
deb http://download.proxmox.com/debian jessie pve-no-subscription |