Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View asheshambasta's full-sized avatar

Ashesh Ambasta asheshambasta

View GitHub Profile
@jannylund
jannylund / 1.sql
Created April 16, 2014 14:13
Play Framework - Example on how to use @OneToMany with Ebean
# --- 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 20:59
Play 2.0/Scala: Handling forms with a numeric (Double) input
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 July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#