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 | |
function nEnabled { | |
system_profiler -detailLevel mini SPAirPortDataType | grep -e 'Supported PHY Modes: .*n' | |
} | |
until nEnabled && sleep 2 && nEnabled; | |
do | |
echo 'resetting airport' | |
networksetup -setairportpower en1 off; networksetup -setairportpower en1 on |
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
import com.twitter.concurrent.{Offer, Broker} | |
import com.twitter.conversions.time._ | |
import com.twitter.finagle._ | |
import com.twitter.util._ | |
object Reeval { | |
/** Given a function `mkVar => Var[A]` and a time interval create another `Var[A]` that: | |
* - initially has a value equal to the value of evaluated `mkVar` | |
* - passes all updates of created var to the observers |
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
# build.properties | |
sbt.version=1.1.6 |
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
import javax.management.MBeanServer; | |
import javax.management.ObjectName; | |
// Run with `-XX:NativeMemoryTracking=detail`. | |
// Use `jcmd Leak VM.native_memory detail | fgrep -B4 -A2 Tracing`, | |
// observe the changes in `Tracing` area and related details. E.g.: | |
// | |
//- Tracing (reserved=1089KB, committed=1089KB) | |
// (malloc=2KB #43) | |
// (arena=1087KB #34) |