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
// I'm looking for a better solution for the time logging (preferable in a transparent way) | |
private def logTime(message: String, promise: Future[Response]) = { | |
// not 100% ok, request is already running | |
// might even not be started yet | |
val now = System.currentTimeMillis | |
promise.onRedeem { response => | |
val time = System.currentTimeMillis - now | |
logger.info(message + " => " + response.status + " " + time + "ms " + response.body.length + "b") | |
} |
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
import com.fasterxml.jackson.databind.{DeserializationContext, JsonDeserializer} | |
import org.joda.time.{DateTimeZone, DateTime} | |
import com.fasterxml.jackson.core.JsonParser | |
import java.io.IOException | |
class MicrosoftJsonDateDeserializer extends JsonDeserializer[DateTime] { | |
val Pattern = """\/Date\((\d+)([-+]\d+)?\)\/""".r | |
def deserialize(jsonParser: JsonParser, deserializationContext: DeserializationContext): DateTime = { | |
val dateString = jsonParser.getText |
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
git checkout newbranch | |
git cherry-pick 612ecb3 |
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
As a ... | |
I want ... | |
so that ... |
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
edit ~/.bash_profile | |
# coloured ll | |
alias ls='ls -aFhG' | |
alias ll='ls -l' | |
# prompt | |
export PS1="\u@\h\w$ " | |
export EDITOR='nano' |
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
add this to ~/.bash_profile | |
export LANG="en_US.utf8" | |
export LANGUAGE="en_US.utf8" | |
export LC_ALL="en_US.utf8" |
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
git config --global color.ui true |
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
install these osxfuse & fuse-ext2 | |
http://osxfuse.github.com/ | |
http://alperakcan.org/?open=projects&project=fuse-ext2 | |
sudo mount -t fuse-ext2 /dev/disk1s1 |
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
import scala.collection.JavaConversions._ |
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
mvn versions:set -DnewVersion=2.4.0-SNAPSHOT -DgenerateBackupPoms=false |