git clone path/to/test/repo.git
git config push.default matching
git branch -a
* master
| #!/bin/sh | |
| SCALAC_CLASSPATH="/home/marko/.m2/repository/org/scala-lang/scala-compiler/2.8.0.RC1/scala-compiler-2.8.0.RC1.jar:/home/marko/.m2/repository/org/scala-lang/scala-library/2.8.0.RC1/scala-library-2.8.0.RC1.jar" | |
| exec java -cp $SCALAC_CLASSPATH -Dscala.boot.class.path=$SCALAC_CLASSPATH scala.tools.nsc.CompileServer $@ |
| object scala { | |
| val version = "SCALA_VERSION$" | |
| } | |
| val xml = <dependencies> | |
| <dependency> | |
| <groupId>org.scalanlp</groupId> | |
| <artifactId>scalala_${scala.version}</artifactId> | |
| <version>0.3.1</version> | |
| </dependency> |
| # pm - Print methods of objects in irb/console sessions. | |
| # Goes in ~./irbrc | |
| # | |
| begin # Utility methods | |
| def pm(obj, *options) # Print methods | |
| methods = obj.methods | |
| methods -= Object.methods unless options.include? :more | |
| filter = options.select {|opt| opt.kind_of? Regexp}.first | |
| methods = methods.select {|name| name =~ filter} if filter |
| require 'rubygems' | |
| require 'hmac-sha1' | |
| require 'net/https' | |
| require 'base64' | |
| s3_access='S3_ACCESS_KEY' | |
| s3_secret='S3_SECRET_KEY' | |
| cf_distribution='CLOUDFRONT_DISTRIBUTION_ID' | |
| if ARGV.length < 1 |
| (defun my-indent-line () | |
| "Make single-semicolon lisp comments indent like ;;-comments. | |
| Mostly cribbed from `lisp-indent-line'." | |
| (interactive) | |
| (let ((indent (calculate-lisp-indent)) shift-amt end | |
| (beg (progn (beginning-of-line) (point)))) | |
| (skip-chars-forward " \t") | |
| (if (or (looking-at "\\s<\\s<") (not (looking-at "\\s<"))) | |
| (lisp-indent-line) | |
| (if (listp indent) (setq indent (car indent))) |
| -- Puts org-mode links to selected mails into clipboard and moves selected mails to archive | |
| -- Replace {MAILBOX} and {ACCOUNT} below | |
| tell application "Mail" | |
| set theLinks to "" | |
| set theSelection to selection | |
| repeat with aMessage in theSelection | |
| set theId to ((content of header "Message-Id" of aMessage) as text) | |
| set theSubject to ((subject of aMessage) as text) | |
| set theSender to sender of aMessage | |
| set theLinks to (theLinks & (createLinkTo(theId, theSender, theSubject) of me)) |
| // generate ensime config | |
| lazy val genEnsime = task (args => { | |
| if (args.length == 1) { | |
| genEnsimeConstructor(args(0).toString) | |
| } else { | |
| task { Some("Usage: gen-ensime <project package name>") } | |
| } | |
| }) describedAs("Generate a .ensime file for this project") | |
| def genEnsimeConstructor(packageName: String) = task { |
| scala> import PimpGrepToCollection._ | |
| import PimpGrepToCollection._ | |
| scala> List("123", "156", "C").grep("\\d"){_.toInt} | |
| res0: List[Int] = List(123, 156) | |
| scala> Set("123", "456", "XXX").grep("\\d"){_.toInt} | |
| res1: scala.collection.immutable.Set[Int] = Set(123, 456) | |
| scala> Vector("A", "100", "XXX").grep("\\d"){_.toInt} |
| let btnUp = new Button("Increment", Visible=true) | |
| let btnDown = new Button("Decrement", Visible=true) | |
| let lbl = new Label(Text=" Count: 0", Visible=true) | |
| Event.merge | |
| (btnUp.Clicked |> Event.map (fun _ -> +1)) | |
| (btnDown.Clicked |> Event.map (fun _ -> -1)) | |
| |> Event.scan (+) 0 | |
| |> Event.map (sprintf " Count: %d") | |
| |> Event.add (fun s -> lbl.Text <- s) |