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
<profile> | |
<id>skipTests</id> | |
<properties> | |
<skipTests>true</skipTests> | |
</properties> | |
</profile> | |
<profile> | |
<id>dontGenerateBackupPoms</id> | |
<properties> |
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
wport() { | |
lsof -n -i4TCP:$1 | |
} |
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/sh -eu | |
# Wait for port to get available | |
LOOPS="1000" | |
PORT=$1 | |
i=0 | |
while ! nc localhost $PORT >/dev/null 2>&1 < /dev/null; do | |
i=`expr $i + 1` | |
if [ $i -ge $LOOPS ]; then |
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
awk '{print toupper(substr($0,1,1)) substr($0,2) }' |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<!-- | |
Simple demo project demonstrating the usage of rhuss/docker-maven-plugin | |
--> | |
<groupId>com.github.mgurov</groupId> | |
<artifactId>docker-maven-runs</artifactId> | |
<version>0.0.1</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 -eux | |
E=$(docker ps -aq --filter "name=mvn_repository") | |
docker ps -aq | grep -v ${E:-lookup_failed} | xargs docker rm -f | |
docker images | sed -E 's/ +/ /g' | grep "^<none> <none>" | cut -d ' ' -f 3 | xargs docker rmi -f |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.provision "docker" |
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
for GIT_DIR in $(find . -name ".git"); do git --git-dir=$GIT_DIR remote -v | cut -d ' ' -f 1 | uniq | grep old_repo | sed 's/old_repo/new_repo/' | xargs -n 2 git --git-dir=$GIT_DIR remote set-url; 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/sh | |
if git remote | grep autosync > /dev/null; then | |
for remote in $(git remote | grep autosync); do | |
git push $remote --all -f | |
done | |
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
import org.apache.spark.sql._ | |
val hc = new org.apache.spark.sql.hive.HiveContext(sc) | |
val schema = StructType(Seq(StructField("dual", StringType, true))) | |
val rowRDD = sc.parallelize(Seq(Row("dual"))) | |
val schemaRDD = hc.applySchema(rowRDD, schema) | |
schemaRDD.registerTempTable("dual") | |
hc.hql("select 'hello world' from dual").collect |