Skip to content

Instantly share code, notes, and snippets.

@madsmith
madsmith / Build.scala
Created June 18, 2013 07:50
An example of an SBT project definition that adds initialCommands to the console task. The standard docs show how to do this in an sbt file. It took some searching to find an example of a project that implements this in it's .scala file. Copied from https://github.com/wookietreiber/eva4s/
import sbt._
import Keys._
import BuildSettings._
import Dependencies._
object BuildSettings {
lazy val baseSettings = Defaults.defaultSettings ++ Seq (
organization := "org.eva4s",
version := "0.1.0-SNAPSHOT",
@madsmith
madsmith / .Readme.md
Last active December 18, 2015 22:09
CTag Language Specification for Scala

CTag Language Specification for Scala

Based off of instructions from http://codesanch.tumblr.com/post/1489753647/to-get-ctags-working-with-scala-and-vim

Expanded regex to handle modifiers as defined by Scala Language Specification and modified tag regex to attempt to match select operator characters between \u0020 and \u007F

Note, I took no care to validate that the modifiers are only used in the proper context (e.g. lazy should not be used with classes). This is meant to extract tags, not validate syntax so there's no gain in that additional level of pedantry.

@madsmith
madsmith / gist:0bae9551c506457043020b0842f29069
Created April 14, 2016 18:25 — forked from mattconnolly/gist:6097313
Adding a zfs dataset to a SmartOS zone. Seems there's no vmadm api for this, but you can do it with zonecfg:
# vmadm halt <uuid>
# zonecfg -z <uuid>
zonecfg:uuid> add dataset
zonecfg:uuid:dataset> set name=<zfs/path>
zonecfg:uuid:dataset> end
zonecfg:uuid> commit
zonecfg:uuid> exit
# zfs set mountpoint=legacy <zfs/path>
# vmadm boot <uuid>