This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#set -o xtrace | |
set -o errexit | |
set -o pipefail | |
set -o nounset | |
bin="$(cd "$(dirname "$0")" > /dev/null; pwd)" | |
longrunning() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## | |
## Script is a automation for collecting metrics that represent (U)sage, (S)aturation, and (E)rrors (USE). | |
## This script is mostly automating [1], so more details can be found there | |
## | |
## References | |
## * [1] http://www.brendangregg.com/USEmethod/use-linux.html | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --index-filter 'git update-index --remove path/to/file/in/git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pre-create nodes so its easier to link them together | |
// add n to first nodes just to make the loop simple | |
Node[] nodes = new Node[targetLevel + 1]; | |
nodes[0] = n; | |
for (int i = 1; i <= targetLevel; i++) | |
nodes[i] = new Node(value, null, nodes[i - 1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Classfile /home/dcapwell/src/github/prototypes/kotlin-collections/build/kotlin-classes/main/com/github/dcapwell/kotlin/collections/ConsList$size$1.class | |
Last modified Sep 17, 2016; size 1976 bytes | |
MD5 checksum fe97807c3d0ade285d2790eb907e3b39 | |
Compiled from "ConsList.kt" | |
final class com.github.dcapwell.kotlin.collections.ConsList$size$1 extends kotlin.jvm.internal.Lambda implements kotlin.jvm.functions.Function2<com.github.dcapwell.kotlin.collections.ConsList<A>, java.lang.Integer, java.lang.Integer> | |
minor version: 0 | |
major version: 50 | |
flags: ACC_FINAL, ACC_SUPER | |
Constant pool: | |
#1 = Utf8 com/github/dcapwell/kotlin/collections/ConsList$size$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//fun <A> nil(): ConsList<A> { | |
// return ConsList.Nil<A> | |
//} | |
sealed class ConsList<A> : Iterable<A> { | |
fun cons(value: A): ConsList<A> { | |
return Cons(value, this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Tracker where | |
---- MODEL ---- | |
type alias Dashboard = | |
{ name : String | |
, active : Bucket | |
, pending : Bucket | |
, icebox : Bucket } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html | |
# eden (free), old (free), young GC time, # full GC, full GC time, total GC time | |
jstat -gc -h10 $(jps -m | grep <process name here> | awk '{print $1}') 1000 0 | awk '/^[0-9]/ {printf "%-10s %-10s %-10s %-10s %-10s %-10s\n", int((100*$6)/$5), int((100*$8)/$7), $(NF-3), $(NF-2), $(NF-1), $NF}' | |
# OR | |
pid=42 | |
jstat -gc -h10 $pid 1000 0 | awk '/^ [0-9]/ {printf "%-10s %-10s %-10s %-10s %-10s %-10s\n", int((100*$6)/$5), int((100*$8)/$7), $(NF-3), $(NF-2), $(NF-1), $NF}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
# | |
# This script will mount /Users in the boot2docker VM using NFS (instead of the | |
# default vboxsf). It's probably not a good idea to run it while there are | |
# Docker containers running in boot2docker. | |
# | |
# Usage: sudo ./boot2docker-use-nfs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tach_demo; | |
import java.net.InetSocketAddress; | |
import tachyon.org.apache.thrift.TProcessor; | |
import tachyon.org.apache.thrift.server.TServer; | |
import tachyon.org.apache.thrift.server.TThreadedSelectorServer; | |
import tachyon.org.apache.thrift.transport.TNonblockingServerSocket; | |
import tachyon.org.apache.thrift.transport.TTransportException; |
NewerOlder