Skip to content

Instantly share code, notes, and snippets.

@zouzias
zouzias / git-aliases.txt
Created October 29, 2015 09:41
Git aliases
# These are my favorite git aliases
alias gs='git status '
alias gl=' git log --graph --oneline --decorate --all '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout '
alias gk='gitk --all&'
@zouzias
zouzias / csvToJSON.py
Last active September 12, 2016 20:21
Convert CSV to JSON with two nested categories
import csv
import json
csvfile = open('voronoid-graph.csv', 'r')
jsonfile = open('output.json', 'w')
fieldnames = ("gene","subcategory","category")
categories = {}
@zouzias
zouzias / AliceInAggregatorLand.scala
Created November 11, 2015 17:36 — forked from johnynek/AliceInAggregatorLand.scala
A REPL Example of using Aggregators in scala
/**
* To get started:
* git clone https://github.com/twitter/algebird
* cd algebird
* ./sbt algebird-core/console
*/
/**
* Let's get some data. Here is Alice in Wonderland, line by line
*/
@zouzias
zouzias / java7macos.txt
Last active November 21, 2015 14:02
How to set JAVA_HOME to Java7 or Java8 on MacOs
1) Download JDK7 from http://www.oracle.com/technetwork/java/javase/downloads/index.html
2) On your ~/.bash_profile do
# For Java 7
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
# For Java 8
export JAVA_HOME=`/usr/libexec/java_home`
@zouzias
zouzias / qlocktwo.txt
Created November 28, 2015 17:21
QlockTwo example of feasible english 10 x 10 layouts
From http://miniaturegiantspacehamster.blogspot.ch/2011/03/building-word-clock-part-1-genetic.html
Version 1
NSEVENFOURC
FELEVENOTWO
TWELVEFIVEV
TEIGHTENONE
TNINETHREEL
SIXHALFIFTY
@zouzias
zouzias / README.md
Created December 23, 2015 17:10 — forked from micjamking/README.md
[JavaScript] Deploying Yeoman apps to Heroku | https://medium.com/console-log-yo/launching-apps-with-yeoman-1d0dfa627305

Deploying Yeoman apps to Heroku

Prerequisites

This assumes you already have a Yeoman app and are ready for publishing

Build for Production

Create production directory & assets

@zouzias
zouzias / a:Oozie Example: Hive Actions
Created January 9, 2016 11:30 — forked from tmusabbir/a:Oozie Example: Hive Actions
Oozie Example: Hive Actions
Oozie Example: Hive Actions
// Elasticsearch 2.x *copies* joda-time code and patch it into their codebase. It causes several issues
// see https://www.elastic.co/blog/to-shade-or-not-to-shade
// assemblyShadeRules in assembly := Seq(
// ShadeRule.rename("org.joda.time.base.**" -> "org.elasticsearch.joda.time.@1").inLibrary("org.elasticsearch" % "elasticsearch" % "2.1.1").inProject
// )
~
@zouzias
zouzias / check_cron.json
Last active April 5, 2016 06:36
Install Sensu on Ubuntu
{
"checks": {
"cron": {
"command": "check-process.rb -p cron",
"standalone": true,
"interval": 60,
"handlers": ["default", "debug"]
}
}
}
@zouzias
zouzias / compileSpark_2.11.sh
Created May 30, 2016 14:39
How to compile Spark with 2.11 support
git clean -ffxd
SPARK_VERSION="1.5.1"
git checkout -f "v$SPARK_VERSION" --
sh dev/change-scala-version.sh 2.11
export MAVEN_OPTS="-Xmx4g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m -XX:+CMSClassUnloadingEnabled"
mvn clean
./make-distribution.sh --tgz --skip-java-test -Pscala-2.11 -Pyarn -Phadoop-2.6 -DskipTests -Dspark.version=$SPARK_VERSION -Dscala.version=2.11.7 -DautoVersionSubmodules=true -U -Djline.version=2.13 -Djline.groupid=jline