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 ColumnDerivations { | |
import shapeless.Generic | |
import shapeless.{ ::, HList, HNil } | |
implicit def hlistColumn[H](implicit c: Column[H]): Column[H :: HNil] = | |
Column(c(_, _).map(_ :: HNil)) | |
implicit def anyvalDerivation[N <: AnyVal, H <: HList](implicit gen: Generic.Aux[N, H], c: Column[H]): Column[N] = | |
Column(c(_, _).map(r => gen.from(r))) | |
} |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
// General parameters | |
uniform sampler2D from; | |
uniform sampler2D to; | |
uniform float progress; | |
uniform vec2 resolution; |
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 play.api.data.validation._ | |
trait Constraints { | |
/** | |
* Defines a ‘required’ constraint for `Optional` values, i.e. one in which None are invalid. | |
* | |
* '''name'''[constraint.required] | |
* '''error'''[error.required] | |
*/ | |
def nonNone[A]: Constraint[Option[A]] = Constraint[Option[A]]("constraint.required") { o => |
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
package play.api.i18n | |
import play.api._ | |
import play.api.i18n._ | |
import scala.collection.JavaConverters._ | |
import scalax.file._ | |
import scalax.io.JavaConverters._ |
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
package controllers | |
import play.api._ | |
import play.api.data._ | |
import play.api.data.Forms._ | |
import play.api.mvc._ | |
object Application extends Controller { | |
val form = Form( |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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 annotation.tailrec | |
import java.util.concurrent.atomic.AtomicReference | |
object Atomic { | |
def apply[T]( obj : T) = new Atomic(new AtomicReference(obj)) | |
implicit def toAtomic[T]( ref : AtomicReference[T]) : Atomic[T] = new Atomic(ref) | |
} | |
class Atomic[T](val atomic : AtomicReference[T]) { | |
@tailrec |
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
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |