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
/* | |
* | |
* To enable this backend, include './backends/riemann' in the backends | |
* configuration array: | |
* | |
* Requires Riemann Node client | |
* | |
* backends: ['./backends/riemann'] | |
* | |
*/ |
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
function parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\{\1\}/' | |
} | |
if [ "$WINDOW" == "" ] ; then | |
# PS1="\[\e[1;36m\]\u\[\e[31m\]@\[\e[33m\]\H\[\e[35m\][\w]\[\e[34m\]{\A}\[\e[0m\]\\$ " | |
# PS1="\[\e[1;36m\]\u\[\e[31m\]@\[\e[33m\]\H\[\e[35m\][\w]\[\e[34m\]\$(parse_git_branch)\[\e[0m\]\\$ " | |
# PS1="\[\e[1;36m\]\u\[\e[31m\]@\[\e[33m\]\H\[\e[35m\][\w]\[\e[34m\]\$(parse_git_branch)\[\e[0m\]\e[\nm\]\e[30;48;5;105m\\$\e[m " |
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
#export GOPATH="$JENKINS_HOME/workspace/project" | |
ls -alh $WORKSPACE | |
export GOPATH="$WORKSPACE" | |
export PATH="$PATH:$GOPATH/bin" | |
#go get github.com/ant0ine/go-json-rest/rest | |
# Build Binary | |
go get github.com/tools/godep |
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
package main | |
import ( | |
"io" | |
"log" | |
) | |
import "net/http" | |
func indexHandler(w http.ResponseWriter, req *http.Request) { | |
//expire := time.Now().AddDate(0, 0, 1) |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/ant0ine/go-json-rest/rest" | |
log "github.com/cihub/seelog" | |
) |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
log "github.com/cihub/seelog" | |
) |
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
.DS_Store | |
tmp/ |
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/spark-shell -packages redis.clients:jedis:2.7.2,com.redislabs:spark-redis:0.5.1 --repositories https://raw.github.com/RedisLabs/spark-redis/mvn-repo/ | |
bad option: '-packages' |
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 | |
# Modify from: https://gist.github.com/rhoegg/5681446 | |
# RHEL Mule Init Script | |
# | |
# chkconfig: 2345 65 64 | |
# description: Mule ESB service | |
. /etc/init.d/functions | |
# | |
if [ -f /etc/sysconfig/mule ]; then |
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
// k-mean | |
import org.apache.spark.mllib.clustering.{KMeans, KMeansModel} | |
import org.apache.spark.mllib.linalg.Vectors | |
import org.apache.spark.mllib.regression.LabeledPoint | |
case class Data(userId: String, videoId: String, isKid: String) | |
val raw_data = sc.textFile("/Users/zzchen/Downloads/locked_video_up5.csv").map { line => | |
val f = line.split(",") | |
Data(f(0),f(1).split("=")(1),f(5)) |
OlderNewer