Download Kafka from:
https://www.apache.org/dyn/closer.cgi/incubator/kafka/kafka-0.7.2-incubating/kafka-0.7.2-incubating-src.tgz
Install Kafka
package main | |
import ( | |
"encoding/json" | |
"log" | |
"time" | |
"code.google.com/p/goauth2/oauth/jwt" | |
bigquery "github.com/google/google-api-go-client/bigquery/v2" | |
) |
# Build tools | |
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y | |
# Install python 2.7 and change default python symlink | |
sudo yum install python27-devel -y | |
sudo rm /usr/bin/python | |
sudo ln -s /usr/bin/python2.7 /usr/bin/python | |
# yum still needs 2.6, so write it in and backup script | |
sudo cp /usr/bin/yum /usr/bin/_yum_before_27 |
[will@fedora pkilldemo]$ ansible-playbook pkilldemo.yml | |
PLAY [localhost] ************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [127.0.0.1] | |
TASK: [generate random process string] **************************************** | |
changed: [127.0.0.1] |
import akka.actor.ActorSystem | |
import scala.concurrent.duration._ | |
val actorSystem = ActorSystem() | |
val scheduler = actorSystem.scheduler | |
val task = new Runnable { def run() { println("Hello") } } | |
implicit val executor = actorSystem.dispatcher | |
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
sudo dpkg -i scala-2.11.4.deb | |
sudo apt-get update |
object Kernel { | |
implicit class Times(val n: Int) extends AnyVal { | |
def times[T](block: => T) = for (i <- 1 to n) yield block | |
def times[T](block: Int => T) = for (i <- 1 to n) yield block(i) | |
} | |
implicit class RunnableConversion(block: => Unit) extends Runnable { | |
def run = block | |
} |
/* | |
This is my hacked up copy of Marked.app/Contents/Resources/gridless.css | |
Changes: | |
1. Smaller headings | |
2. ~~No scrollbars~~ (I now prefer the Lion default behavior) | |
3. Styling of definition lists ala LaTeX description lists. | |
4. Centering h1.title, h3.author, h4.date (pandoc's title/author/date block). | |
#!/bin/sh | |
TABLE_SCHEMA=$1 | |
TABLE_NAME=$2 | |
mytime=`date '+%y%m%d%H%M'` | |
hostname=`hostname | tr 'A-Z' 'a-z'` | |
file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA" | |
bucket_name=$file_prefix | |
splitat="4000000000" | |
bulkfiles=200 |
#SingleInstance force | |
; Necessary for semicolon arrow to work, since it can send semicolon. | |
#InstallKeybdHook | |
; Better performance. | |
SendMode Input | |
; Kill CapsLock. | |
SetCapsLockState AlwaysOff |