This file contains 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
{ | |
"title" : "iTunes direct", | |
"rules" : [ | |
{ | |
"manipulators" : [ | |
{ | |
"from" : { | |
"modifiers" : { | |
"mandatory" : [ | |
"fn", |
This file contains 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
; Logitech Harmony Remote / Pivos XIOS DS Media Player remote | |
; for ENY M8 Android TV Box | |
; | |
; Author: Johan van Zoomeren | |
; Date : June 28th 2014 | |
; | |
; Original M8 remote is not available in the Logitech Database. Pivos XIOS DS is | |
; available in the Logitech database and is sending IR codes using required NEC | |
; protocol. Though physically this remote does not have a lot buttons, the | |
; Logitech database provides more. All of which are mapped below. |
This file contains 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
case class FormUser(name: String, email:String) | |
case class DbUser(id: Option[Long], name: String) | |
case class DbEmail(id: Option[Long], email: String, relation:Long) | |
def action = { | |
userFromForm: FormUser = bindFromForm() | |
val newDbUser = db.insert(DbUser(None, userFromForm.name)) | |
val newDbEmail = db.insert(DbEmail(None, userFromForm.email, newDbUser.id.get)) | |
} |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am targeter on github. | |
* I am targeter (https://keybase.io/targeter) on keybase. | |
* I have a public key whose fingerprint is 2E8E 2E0E 7232 C489 15C9 EADB F128 8EA6 E0CD 3CB8 | |
To claim this, I am signing this object: |
This file contains 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
def processDocument(documentKey: String): Future[Option[Elem]] = { | |
val inputStream = new PipedInputStream(8192) | |
val outputStream = new PipedOutputStream(inputStream) | |
Mongo.getDocument(documentKey).map(_.map(readFile => | |
{ | |
val write = Mongo.gridFs.readToOutputStream(readFile, outputStream).onComplete { | |
case _ => outputStream.close() | |
} | |
XML.load(inputStream) | |
} |
This file contains 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
val ofi:Option[Future[Int]] = Some(future(1)) | |
val foi:Future[Option[Int]] = ofi.fold(future(None: Option[Int]))(_.map {i: Int => Some(i)} ) |
This file contains 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
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false"> | |
<defaultCache | |
maxElementsInMemory="10000" | |
eternal="false" | |
timeToIdleSeconds="120" | |
timeToLiveSeconds="120" | |
overflowToDisk="false" | |
maxElementsOnDisk="10000000" | |
diskPersistent="true" |
This file contains 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
@Array("error", "warning", "success", "info").map { level => | |
@if(flash.contains(level)) { | |
<div class="alert alert-@level"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
@flash.get(level) | |
</div> | |
} | |
} |
This file contains 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
13:26:26,627 ERROR ~ | |
@6b8i881bh | |
Internal Server Error (500) for request POST /relations/dosendmessage | |
Execution exception (In /app/controllers/Relations.java around line 787) | |
IllegalArgumentException occured : org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [select generatedAlias0 from models.Relation as generatedAlias0 where generatedAlias0.id in ()] | |
play.exceptions.JavaExecutionException: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [select generatedAlias0 from models.Relation as generatedAlias0 where generatedAlias0.id in ()] | |
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:229) |
This file contains 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
@(productForm: Form[Product]) | |
@import helper._ | |
@import helper.twitterBootstrap._ | |
@main("Product form") { | |
<h1>Product form</h1> | |
@helper.form(action = routes.Products.save()) { | |
<fieldset> | |
<legend>Product @productForm("name").valueOr("(new)")</legend> | |
@helper.inputText(productForm("ean")) | |
@helper.inputText(productForm("name")) |
NewerOlder