Skip to content

Instantly share code, notes, and snippets.

View rktoomey's full-sized avatar

Rose Toomey rktoomey

View GitHub Profile
@rktoomey
rktoomey / gist:797914
Created January 27, 2011 01:50
Clean build of querulous 1.2.0-generic from scratch using sbt
cb@marzipan:~$ git clone https://github.com/rktoomey/querulous-generic.git
Initialized empty Git repository in /home/cb/querulous-generic/.git/
remote: Counting objects: 1241, done.
remote: Compressing objects: 100% (422/422), done.
remote: Total 1241 (delta 537), reused 1087 (delta 443)
Receiving objects: 100% (1241/1241), 128.69 KiB | 182 KiB/s, done.
Resolving deltas: 100% (537/537), done.
cb@marzipan:~$ cd querulous-generic/
cb@marzipan:~/querulous-generic$ sbt
Getting Scala 2.7.7 ...
@rktoomey
rktoomey / gist:798989
Created January 27, 2011 18:55
Clean build of querulous 1.2.0-generic from scratch using ant
cb@calisson:~$ git clone git://github.com/rktoomey/querulous-generic.git
Initialized empty Git repository in /home/cb/querulous-generic/.git/
remote: Counting objects: 1278, done.
remote: Compressing objects: 100% (458/458), done.
remote: Total 1278 (delta 558), reused 1084 (delta 443)
Receiving objects: 100% (1278/1278), 134.19 KiB, done.
Resolving deltas: 100% (558/558), done.
cb@calisson:~$ cd querulous-generic/
cb@calisson:~/querulous-generic$ ant
Buildfile: /home/cb/querulous-generic/build.xml
@rktoomey
rktoomey / gist:812272
Created February 5, 2011 06:17
Clean build of novus/salat
cb@marzipan:~$ git clone git://github.com/novus/salat.git
Initialized empty Git repository in /home/cb/salat/.git/
remote: Counting objects: 971, done.
remote: Compressing objects: 100% (469/469), done.
remote: Total 971 (delta 378), reused 603 (delta 236)
Receiving objects: 100% (971/971), 113.23 KiB, done.
Resolving deltas: 100% (378/378), done.
cb@marzipan:~$ cd salat/
cb@marzipan:~/salat$ sbt update publish-local
Getting Scala 2.7.7 ...
@rktoomey
rktoomey / gist:898115
Created April 1, 2011 13:09
Ways to look at a compiled Scala class
rose@marzipan:~/workspace/salat/target/scala_2.8.1/test-classes/com/novus/salat/test/model$ scalap -cp . "Maud"
package com.novus.salat.test.model
@scala.serializable
case class Maud(swept : scala.Predef.String, out : scala.Predef.String) extends java.lang.Object with scala.ScalaObject with scala.Product {
val swept : scala.Predef.String = { /* compiled code */ }
val out : scala.Predef.String = { /* compiled code */ }
@com.novus.salat.annotations.raw.Persist
val toSea : scala.Predef.String = { /* compiled code */ }
def copy(swept : scala.Predef.String, out : scala.Predef.String) : com.novus.salat.test.model.Maud = { /* compiled code */ }
override def hashCode() : scala.Int = { /* compiled code */ }
@rktoomey
rktoomey / ScalaSigOrBust.scala
Created May 11, 2011 16:24
Trying to get ScalaSig for class in REPL
Welcome to Scala version 2.9.0.RC4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24).
Type in expressions to have them evaluated.
Type :help for more information.
scala> case class Foo(x: String) {
| def distinctiveMethodName = "Hello"
| }
defined class Foo
scala> val clazz = classOf[Foo]
@rktoomey
rktoomey / gist:1107284
Created July 26, 2011 17:28
Clean build of casbah-salat-maven-example
cb@calisson:~$ ls -al
total 40
drwxr-xr-x 3 cb cb 4096 2011-07-26 13:22 .
drwxr-xr-x 5 root root 4096 2011-01-27 09:07 ..
-rw------- 1 cb cb 1824 2011-07-26 13:22 .bash_history
-rw-r--r-- 1 cb cb 220 2010-08-10 16:47 .bash_logout
-rw-r--r-- 1 cb cb 3353 2010-08-10 16:47 .bashrc
-rw-r--r-- 1 cb cb 179 2010-09-15 07:41 examples.desktop
-rw-r--r-- 1 cb cb 675 2010-08-10 16:47 .profile
drwxr-xr-x 10 cb cb 4096 2011-01-27 12:22 querulous-generic
@rktoomey
rktoomey / gist:1112062
Created July 28, 2011 17:35
Using xsbt 0.10.1 with salat
rose@calisson:~$ sudo su - cb
cb@calisson:~$ ls -al
total 36
drwxr-xr-x 2 cb cb 4096 2011-09-16 15:02 .
drwxr-xr-x 5 root root 4096 2011-01-27 09:07 ..
-rw------- 1 cb cb 2599 2011-09-16 15:02 .bash_history
-rw-r--r-- 1 cb cb 220 2010-08-10 16:47 .bash_logout
-rw-r--r-- 1 cb cb 3353 2010-08-10 16:47 .bashrc
-rw-r--r-- 1 cb cb 179 2010-09-15 07:41 examples.desktop
@rktoomey
rktoomey / BinaryTypeHintContext.scala
Created August 4, 2011 13:47
Binary "when necessary" type hinting with Salat
package com.novus.salat.test
import com.novus.salat.util.encoding.TypeHintEncoding
import com.novus.salat.{ TypeHintFrequency, BinaryTypeHintStrategy, Context }
package object when_necessary_binary_type_hint_encoding {
implicit val ctx = new Context {
val name = Some("WhenNecessary-BinaryTypeHint")
override val typeHintStrategy = BinaryTypeHintStrategy(when = TypeHintFrequency.WhenNecessary,
typeHint = "t",
@rktoomey
rktoomey / gist:1313695
Created October 25, 2011 18:10
Clean build of salat 0.0.8-SNAPSHOT for 2.9.1
$ sudo su - cleanbuild
cleanbuild@marzipan:~$ ls -al
total 28
drwxr-xr-x 2 cleanbuild cleanbuild 4096 2011-10-25 13:10 .
drwxr-xr-x 5 root root 4096 2011-10-25 13:02 ..
-rw------- 1 cleanbuild cleanbuild 195 2011-10-25 13:10 .bash_history
-rw-r--r-- 1 cleanbuild cleanbuild 220 2011-10-25 13:02 .bash_logout
-rw-r--r-- 1 cleanbuild cleanbuild 3353 2011-10-25 13:02 .bashrc
-rw-r--r-- 1 cleanbuild cleanbuild 179 2011-10-25 13:02 examples.desktop
-rw-r--r-- 1 cleanbuild cleanbuild 797 2011-10-25 13:03 .profile
@rktoomey
rktoomey / gist:1313696
Created October 25, 2011 18:10
Clean build of salat 0.0.8-SNAPSHOT for 2.9.1
cleanbuild@marzipan:~$ ls -al
total 28
drwxr-xr-x 2 cleanbuild cleanbuild 4096 2011-11-08 10:47 .
drwxr-xr-x 5 root root 4096 2011-10-25 13:02 ..
-rw------- 1 cleanbuild cleanbuild 689 2011-11-08 10:47 .bash_history
-rw-r--r-- 1 cleanbuild cleanbuild 220 2011-10-25 13:02 .bash_logout
-rw-r--r-- 1 cleanbuild cleanbuild 3353 2011-10-25 13:02 .bashrc
-rw-r--r-- 1 cleanbuild cleanbuild 179 2011-10-25 13:02 examples.desktop
-rw-r--r-- 1 cleanbuild cleanbuild 797 2011-10-25 13:03 .profile
-rw-rw-r-- 1 cleanbuild cleanbuild 0 2011-10-25 13:15 .sbt.cache.lock