This file contains hidden or 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
// 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 { |
This file contains hidden or 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
-- 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)) |
This file contains hidden or 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
(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))) |
This file contains hidden or 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
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 |
This file contains hidden or 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
# 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 |
This file contains hidden or 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 scala { | |
val version = "SCALA_VERSION$" | |
} | |
val xml = <dependencies> | |
<dependency> | |
<groupId>org.scalanlp</groupId> | |
<artifactId>scalala_${scala.version}</artifactId> | |
<version>0.3.1</version> | |
</dependency> |
This file contains hidden or 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/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 $@ |
NewerOlder