Skip to content

Instantly share code, notes, and snippets.

View jrk's full-sized avatar

Jonathan Ragan-Kelley jrk

View GitHub Profile
#
# this script will go through all pools and scrub them one at a time
# Via http://aspiringsysadmin.com/blog/2007/06/07/scrub-your-zfs-file-systems-regularly/
#
[email protected]
ZPOOL=/usr/sbin/zpool
TMPFILE=/tmp/scrub.sh.$$.$RANDOM
scrub_in_progress() {
# A tiny DSL implementation for a minimal subset of BASIC in Scala
# Via http://www.nabble.com/-scala--ease-of-making-DSLs-in-Scala---nobody-cares-to22450638.html
class BasicClass {
abstract sealed class BasicLine
case class PrintLine(num: Int, s: String) extends BasicLine
case class GotoLine(num: Int, to: Int) extends BasicLine
val lines = new scala.collection.mutable.HashMap[Int, BasicLine]
case class linebuilder(num: Int) {
def GOTO(to: Int) = lines(num) = GotoLine(num, to)
@jrk
jrk / gist:70797
Created February 26, 2009 11:04
foreach in bash
# foreach in bash
for file in `echo *`
do
do_stuff_to $file
done