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
#!/bin/bash | |
# Finds procastinators in a git repo by looking for lines with the string TODO in it | |
# whose commit dates are from more than a month ago. | |
now=`date +%s` | |
let month_ago="$now - (30*24*60*60)" | |
echo $now $month_ago | |
for grepResult in `git grep -n TODO|cut -f 1,2 -d ':'`; do |
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 org.mockito.Mockito; | |
import org.mockito.invocation.InvocationOnMock; | |
import org.mockito.stubbing.Answer; | |
import org.testng.Assert; | |
import org.testng.annotations.Test; | |
public class MyUnitTest { | |
int executions; | |
class ServiceA { | |
final ServiceB runner; |
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
object ArrayTest { | |
def time(thunkName: String, iter: Int, thunk: => Boolean) = { | |
// warm up... | |
for(i <- 1 to iter) thunk | |
// timed... | |
val start = System.currentTimeMillis() | |
for(i <- 1 to iter) thunk | |
val timing = System.currentTimeMillis() - start | |
println(String.format("Ran %d iterations of [%s] in %d ms.", iter.asInstanceOf[AnyRef], thunkName, timing.asInstanceOf[AnyRef])) | |
} |