Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ryan-williams on github.
  • I am rdub (https://keybase.io/rdub) on keybase.
  • I have a public key whose fingerprint is 3248 9B5F 5301 C6D1 15A5 6E02 B66A 617D CB87 23AE

To claim this, I am signing this object:

@ryan-williams
ryan-williams / metrics.properties
Created February 26, 2015 00:47
Spark metrics.properties example
# Enable Graphite
*.sink.graphite.class=org.apache.spark.metrics.sink.GraphiteSink
*.sink.graphite.host=<graphite host>
*.sink.graphite.port=<graphite port>
*.sink.graphite.period=10
# Enable jvm source for instance master, worker, driver and executor
master.source.jvm.class=org.apache.spark.metrics.source.JvmSource
worker.source.jvm.class=org.apache.spark.metrics.source.JvmSource
driver.source.jvm.class=org.apache.spark.metrics.source.JvmSource
@ryan-williams
ryan-williams / nginx.conf
Last active June 9, 2016 08:11
Grafana quick-start files
worker_processes 1;
pid <home>/logs/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
@ryan-williams
ryan-williams / clone-and-make
Last active August 29, 2015 14:16
ekg/vg OSX installation issues
Tue 19:54:39 ryan@mbp: c:master$ git clone --recursive https://github.com/ekg/vg.git
Cloning into 'vg'...
remote: Counting objects: 1925, done.
remote: Total 1925 (delta 0), reused 0 (delta 0), pack-reused 1925
Receiving objects: 100% (1925/1925), 2.73 MiB | 4.48 MiB/s, done.
Resolving deltas: 100% (1369/1369), done.
Checking connectivity... done.
Submodule 'bash-tap' (https://github.com/illusori/bash-tap.git) registered for path 'bash-tap'
Submodule 'fastahack' (https://github.com/ekg/fastahack.git) registered for path 'fastahack'
Submodule 'gssw' (https://github.com/ekg/gssw.git) registered for path 'gssw'
This file has been truncated, but you can view the full file.
Container: container_1426705269584_0055_01_000001 on demeter-csmau08-13.demeter.hpc.mssm.edu_8041
===================================================================================================
LogType: stderr
LogLength: 8225259
Log Contents:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data/11/mapred/local/yarn/nm/usercache/willir31/filecache/192/spark-assembly-1.3.0-SNAPSHOT-hadoop2.3.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.3.2-1.cdh5.3.2.test/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
@ryan-williams
ryan-williams / .colors-rc
Last active August 29, 2015 14:20
Some helper files for bash $PS1 coloring
#!/usr/bin/env bash
export SOURCEME_DIR="$s/source-files"
try_source() {
for arg in "$@"; do
if [ -s "$arg" ]; then
debug "Sourcing: $arg"
source "$arg"
elif [ -s "$SOURCEME_DIR/$arg" ]; then
debug "Sourcing: $SOURCEME_DIR/$arg"
@ryan-williams
ryan-williams / gist:d8a6e6afa716ff08f187
Created August 25, 2015 15:14
Scala element appending to Lists, Arrays, Vectors
scala> def time(n: Int) = { def t = System.currentTimeMillis; val before = t; (1 to n).foldLeft[List[Int]](Nil)((l,i) => l :+ i); val after = t; after - before }
time: (n: Int)Long
scala> time(10000)
res10: Long = 1604
scala> time(10000)
res11: Long = 1585
scala> time(20000)
@ryan-williams
ryan-williams / sixs.sam
Created September 15, 2015 20:18
Reads whose names appear six times
@HD VN:1.4 SO:unsorted
@SQ SN:chr13 LN:115169878 M5:CHR13
@SQ SN:chr19 LN:59128983 M5:CHR19
@SQ SN:chr16 LN:90354753 M5:CHR16
@SQ SN:chr1 LN:249250621 M5:CHR1
@SQ SN:chr14 LN:107349540 M5:CHR14
@SQ SN:chr20 LN:63025520 M5:CHR20
@SQ SN:chr5 LN:180915260 M5:CHR5
@SQ SN:chr6 LN:171115067 M5:CHR6
@SQ SN:chr10 LN:135534747 M5:CHR10