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
#!/usr/bin/env python | |
import pprint | |
import json | |
import corenlp | |
corenlp_dir = "/tmp/stanford-corenlp-full-2013-06-20" | |
parser = corenlp.StanfordCoreNLP(corenlp_path=corenlp_dir) | |
result_json = json.loads(parser.parse("hey shut down the station")) | |
pprint.pprint(result_json) |
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 | |
echo "Notify commits to slack" | |
channel=$2 | |
icon=$4 | |
payload="payload={\"channel\":\"$channel\",\"username\":\"webhookbot\",\"text\":\"Push on ${STASH_REPO_NAME} by ${STASH_USER_NAME} <$STASH_USER_EMAIL>\",\"icon_emoji\":\"$icon\",\"attachments\":[" | |
while read from_ref to_ref ref_name; do | |
message=`git log --format=%B -n 1 ${to_ref}` | |
title="[$STASH_REPO_NAME:$ref_name] <$3/commits/$to_ref|$to_ref>: $message" |
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
# Build Docker image and run it as a container. | |
def up | |
begin | |
lock = File.open('/var/lock/subsys/pool.lock', 'w') | |
if lock.flock(File::LOCK_EX | File::LOCK_NB ) | |
image_id = build | |
container_id = run image_id | |
confirm_running container_id | |
else |
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
pipeline: | |
- stage_name: command_stage_1 | |
command: echo "hello, world" | |
run_after: | |
- stage_name: command_stage_2_group_1 | |
command: echo "hello, world, command_stage_2_group_1" && sleep 1 | |
- stage_name: command_stage_3_group_1 | |
command: echo "hello, world, command_stage_3_group_1"&& sleep 0.2 | |
run_after: | |
- stage_name: command_stage_3_group_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
cd /tmp | |
wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz | |
tar -xzf go1.3.3.linux-amd64.tar.gz -C /usr/local | |
cat << EOF > /etc/profile.d/golang.sh | |
export PATH=\$PATH:/usr/local/go/bin | |
EOF |
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 | |
cd /tmp | |
wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.rpm" | |
rpm -Uvh jdk-7u67-linux-x64.rpm |
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
cd /tmp | |
wget http://ftp.tsukuba.wide.ad.jp/software/apache/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz | |
tar -xzf apache-maven-3.2.3-bin.tar.gz -C /opt/ | |
cat << EOF > /etc/profile.d/maven.sh | |
export M3_HOME=/opt/apache-maven-3.2.3 | |
export M3=\$M3_HOME/bin | |
export PATH=\$M3:$PATH | |
EOF |
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 | |
rpm -i 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' | |
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt | |
yum -y --enablerepo=rpmforge-extras update git |
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
class WSLogger | |
def initialize(ws) | |
@ws = ws | |
end | |
def write(*args) | |
@ws.send(*args) | |
end | |
def close |
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
#!/usr/bin/env ruby | |
require 'net/ssh' | |
require 'highline/import' | |
def get_password | |
ask( "Enter Password: " ) {|q| q.echo = '*'} | |
end | |
def remote_sudo host, ssh_user, command, opts={} |