Skip to content

Instantly share code, notes, and snippets.

@yanakad
yanakad / Profile Rust on Linux.md
Created October 18, 2021 12:44 — forked from KodrAus/Profile Rust on Linux.md
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

NOTE: See @GabrielMajeri's comments below about the -g option.

@yanakad
yanakad / consoleColors.js
Created October 5, 2021 12:40 — forked from abritinthebay/consoleColors.js
The various escape codes you can use to color output to StdOut from Node JS
// Colors reference
// You can use the following as so:
// console.log(colorCode, data);
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`);
//
// ... and so on.
export const reset = "\x1b[0m"
export const bright = "\x1b[1m"
export const dim = "\x1b[2m"
@yanakad
yanakad / byobuCommands
Created November 19, 2016 02:45 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@yanakad
yanakad / EmbeddedKafkaCluster.java
Created December 23, 2015 16:35 — forked from vmarcinko/EmbeddedKafkaCluster.java
Embedded Zookeeper & Kafka cluster
import kafka.server.KafkaConfig;
import kafka.server.KafkaServer;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;

Boston Spark Community Updates

  • 1000+ members; Meetup started in May 2014.
  • Speakers: We want you!
    • Feature talks or Lighting talks
  • Sponsors: You want us!
    • Host an event, pay for food and drink, or cover other event costs.
  • Take a few minutes at the start of the event to pitch your company, job, or product.
@yanakad
yanakad / gist:47cfc8c5afaa7b525181
Created October 16, 2015 20:15 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@yanakad
yanakad / DebugLog
Last active August 29, 2015 14:21
Register table from different threads
registered table thread_459 <--Register table gets called
dropped table thread_259
dropped table thread_759
registered table thread_860
dropped table thread_860
registered table thread_560
registered table thread_060
registered table thread_960
registered table thread_160
dropped table thread_560
@yanakad
yanakad / Multiples.png
Last active August 29, 2015 14:19
Spark parallelism
Multiples.png
@yanakad
yanakad / elasticsearch-spark
Created March 27, 2015 15:48
Elasticsearch schemaRDD repro
wget http://www.eng.lsu.edu/mirrors/apache/spark/spark-1.2.1/spark-1.2.1-bin-hadoop2.3.tgz
tar -xf spark-1.2.1-bin-hadoop2.3.tgz
cd spark-1.2.1-bin-hadoop2.3/bin/
wget https://oss.sonatype.org/content/repositories/snapshots/org/elasticsearch/elasticsearch-hadoop/2.1.0.BUILD-SNAPSHOT/elasticsearch-hadoop-2.1.0.BUILD-20150324.023417-341.jar
./spark-shell --jars elasticsearch-hadoop-2.1.0.BUILD-20150324.023417-341.jar
import org.apache.spark.sql.SQLContext
case class KeyValue(key: Int, value: String)
val sqlContext = new org.apache.spark.sql.SQLContext(sc)
@yanakad
yanakad / 2Workers.png
Last active September 9, 2015 19:16
Multiple workers per node
2Workers.png