Skip to content

Instantly share code, notes, and snippets.

christoph a. müller kritop

View GitHub Profile
@kritop
kritop / mysql_to_big_query.sh
Created March 1, 2017 13:11 — forked from shantanuo/mysql_to_big_query.sh
Copy MySQL table to big query. If you need to copy all tables, use the loop given at the end. Exit with error code 3 if blob or text columns are found. The csv files are first copied to google cloud before being imported to big query.
#!/bin/sh
TABLE_SCHEMA=$1
TABLE_NAME=$2
mytime=`date '+%y%m%d%H%M'`
hostname=`hostname | tr 'A-Z' 'a-z'`
file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA"
bucket_name=$file_prefix
splitat="4000000000"
bulkfiles=200
@kritop
kritop / csv-import.js
Created September 17, 2016 17:47
simple csv import node es6
"use strict";
import fs from 'fs-extra';
import csv from 'csv';
var parser = csv.parse({delimiter: ';',
trim: true,
columns: [1,2,3,4,5]
}, function(err, data){
console.log(data);
@kritop
kritop / alpine_wget_with_ssl.txt
Created September 6, 2016 15:43
make wget work with ssl on alpine linux
apk update && apk add ca-certificates && update-ca-certificates && apk add openssl
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #