Skip to content

Instantly share code, notes, and snippets.

View ee08b397's full-sized avatar
🎾

Songxiao Zhang ee08b397

🎾
  • BlackRock
  • New York, New York
  • 09:45 (UTC -04:00)
View GitHub Profile
@ee08b397
ee08b397 / benchmark-commands.txt
Created June 8, 2018 14:31 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@ee08b397
ee08b397 / .zshrc
Created April 19, 2018 20:48 — forked from nvzqz/.zshrc
.zshrc for OS X
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="gianu"
# ZSH_THEME="minimal"
# ZSH_THEME="dst"
@ee08b397
ee08b397 / install_font_scp.sh
Created November 29, 2017 14:56 — forked from veggiemonk/install_font_scp.sh
install source code pro font in Ubuntu 14.04.2
#!/bin/sh
echo "installing fonts at $PWD to ~/.fonts/"
mkdir -p ~/.fonts/adobe-fonts/source-code-pro
git clone https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro
# find ~/.fonts/ -iname '*.ttf' -exec echo \{\} \;
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro
echo "finished installing"
d
@ee08b397
ee08b397 / CoderDojo.md
Created May 6, 2016 00:27 — forked from KartikTalwar/CoderDojo.md
GitHub CoderDojo - Intro to D3.js

Animations in JavaScript

D3.js

Library that uses HTML, CSS and SVG to bring data to life.

Setting Up

@ee08b397
ee08b397 / DotProduct.scala
Created April 28, 2016 19:53 — forked from samklr/DotProduct.scala
DotProduct matrix in scala and on spark
def dotProduct(vector: Array[Int], matrix: Array[Array[Int]]): Array[Int] = {
// ignore dimensionality checks for simplicity of example
(0 to (matrix(0).size - 1)).toArray.map( colIdx => {
val colVec: Array[Int] = matrix.map( rowVec => rowVec(colIdx) )
val elemWiseProd: Array[Int] = (vector zip colVec).map( entryTuple => entryTuple._1 * entryTuple._2 )
elemWiseProd.sum
} )
}
@ee08b397
ee08b397 / buzzfeed_api.md
Created April 14, 2016 14:57
BuzzFeed API - hackNY hackathon
                                               .--.
                                               `.  \
                                                 \  \
                                                  .  \
                                                  :   .
                                                  |    .
                                                  |    :
                                                  |    |
  ..._  ___                                       |    |
 `."".`''''""--..___ | |
@ee08b397
ee08b397 / install_eclipse.sh
Created April 14, 2016 14:19
install eclipse
#!/bin/sh
# http://blog.brunobraga.net/eclipse-42-in-ubuntu-1204/
ECLIPSE=/usr/lib/eclipse/eclipse
inject_update_site(){
if [ ! -e "$1" ] ; then
echo "W: Cannot find $1" 2>&1
return 1
fi
@ee08b397
ee08b397 / twitter.json
Created March 24, 2016 22:47 — forked from hrp/twitter.json
Example JSON response from Twitter streaming API
{
"text": "RT @PostGradProblem: In preparation for the NFL lockout, I will be spending twice as much time analyzing my fantasy baseball team during ...",
"truncated": true,
"in_reply_to_user_id": null,
"in_reply_to_status_id": null,
"favorited": false,
"source": "<a href=\"http://twitter.com/\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_screen_name": null,
"in_reply_to_status_id_str": null,
"id_str": "54691802283900928",
@ee08b397
ee08b397 / Main.scala
Created March 7, 2016 03:49 — forked from guenter/Main.scala
A simple Mesos "Hello World": downloads and starts a Python web server on every node in the cluster.
import mesosphere.mesos.util.FrameworkInfo
import org.apache.mesos.MesosSchedulerDriver
/**
* @author Tobi Knaup
*/
object Main extends App {