Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
[Coffee] -> IO Code

Ashesh Ambasta asheshambasta

💭
[Coffee] -> IO Code
View GitHub Profile
@jannylund
jannylund / 1.sql
Created Apr 16, 2014
Play Framework - Example on how to use @OneToMany with Ebean
View 1.sql
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table relation (
id bigint not null,
user_id bigint,
constraint pk_relation primary key (id))
;
@society20
society20 / DoubleFormat.scala
Created May 11, 2012
Play 2.0/Scala: Handling forms with a numeric (Double) input
View DoubleFormat.scala
package utils
import play.api.data.format.Formatter
import play.api.data.Mapping
import play.api.data.format.Formats._
import play.api.data.FormError
import play.api.data.Forms._
import play.api.data.validation.Constraint
import play.api.data.validation.Invalid
import play.api.data.validation.Valid
@michiel
michiel / cors-nginx.conf
Created Jul 5, 2011
Wide-open CORS config for nginx
View cors-nginx.conf
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#