Coreos project : security analysis for docker images https://github.com/coreos/clair
Moder dynamic routing written in go https://github.com/containous/traefik
bash-4.3# curl -4 \ | |
--insecure \ | |
-sSf \ | |
-w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nAppCon time:\t%{time_appconnect}\nRedirect time:\t%{time_redirect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' \ | |
-o /dev/null | |
-XPUT https://my-endpoint |
Coreos project : security analysis for docker images https://github.com/coreos/clair
Moder dynamic routing written in go https://github.com/containous/traefik
PRO TIP: Transfer git repo without `.git` folder using tar.gz | ssh `git archive HEAD | gzip -c | ssh <host> 'tar -zxvf -' |
apache-spark-stderr-and-stdout
Try this in log4j.properties passed to Spark (or modify default configuration under Spark/conf)
# Log to stdout and stderr
log4j.rootLogger=INFO, stdout, stderr
http://henningpetersen.com/post/22/running-apache-spark-jobs-from-applications
// NOTE: This is an expensive operation in terms of time (10 seconds+). Use sparingly.
private def runSparkSubmit(args: Seq[String]): Unit = {
val sparkHome = sys.props.getOrElse("spark.test.home", fail("spark.test.home is not set!"))
val process = Utils.executeCommand(
Seq("./bin/spark-submit") ++ args,
#!/bin/sh | |
str_in_list() { | |
str="$1" | |
shift | |
list="$@" | |
if test "${list#*$str}" != "$list" | |
then | |
return 0 # $str is in $list | |
else |
import java.sql._ | |
dataframe.coalesce("NUMBER OF WORKERS").mapPartitions((d) => Iterator(d)).foreach { batch => | |
val dbc: Connection = DriverManager.getConnection("JDBCURL") | |
val st: PreparedStatement = dbc.prepareStatement("YOUR PREPARED STATEMENT") | |
batch.grouped("# Of Rows you want per batch").foreach { session => | |
session.foreach { x => | |
st.setDouble(1, x.getDouble(1)) | |
st.addBatch() | |
} |
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |