/v1/node
/v1/node/failed
/v1/execute
/v1/statement
/v1/query
/v1/query/{query_id}
/v1/thread
/ui/thread
/v1/task
/v1/task/{task_id}
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
# Do this on every node of the cluster | |
curl -O http://www.congiu.net/hive-json-serde/1.3.8/hdp23/json-serde-1.3.8-jar-with-dependencies.jar | |
sudo cp json-serde-1.3.8-jar-with-dependencies.jar /usr/lib/presto/plugin/hive-hadoop2/ | |
sudo chown presto:presto /usr/lib/presto/plugin/hive-hadoop2/json-serde-1.3.8-jar-with-dependencies.jar | |
#restart presto | |
sudo restart presto-server |
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 | |
# USAGE: csv2sql.sh NO_HEADER.csv TABLE_NAME | |
# Delete all rows from TABLE_NAME and import NO_HEADER.csv into it. | |
sqlite3 collection.anki2 <<EOF | |
DELETE FROM $2; | |
.mode csv | |
.import $1 $2 | |
EOF |
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
import sys | |
import boto | |
# based on http://www.quora.com/Amazon-S3/What-is-the-fastest-way-to-measure-the-total-size-of-an-S3-bucket | |
# assumes you've already configured your access id & secret key | |
s3 = boto.connect_s3() |
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
import re, sys | |
NX = True | |
try: | |
import networkx as nx | |
except: | |
NX = False | |
sys.stderr.write("Could not import nx\npip install networkx, please\n") | |
plan39 = """ | |
Map 1 <- Map 5 (BROADCAST_EDGE), Map 6 (BROADCAST_EDGE), Map 8 (BROADCAST_EDGE), Reducer 7 (BROADCAST_EDGE), Reducer 9 (BROADCAST_EDGE) |
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
# run as root | |
git clone git@github.com:dimitri/pgloader.git | |
cd pgloader | |
mkdir -p /opt/src/pgloader | |
cp -R * /opt/src/pgloader | |
apt-get update | |
apt-get install -y wget curl make git bzip2 time libzip-dev libssl1.0.0 openssl | |
apt-get install -y patch unzip libsqlite3-dev gawk freetds-dev subversion |
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 | |
# You'll need to have sox, pavucontrol and alsa-utils installed, and the snd_aloop kernel module loaded. | |
# You can configure your system to load it on startup or load it manually with "sudo modprobe snd_aloop" | |
# Once this is script is running, you need to start recording audio in the application of your | |
# preference, open pavucontrol, go to the recording tab and change the recording source of that application | |
# to "Monitor of Loopback ..." | |
time=5 |
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
(defun git-add-files(files) | |
"Run git add with the input file" | |
(interactive) | |
(shell-command (format "git add %s" files))) | |
(defun dired-git-add-marked-files() | |
"For each marked file in a dired buffer add it to the index" | |
(interactive) | |
(if (eq major-mode 'dired-mode) | |
(let ((filenames (dired-get-marked-files)) |
OlderNewer