Skip to content

Instantly share code, notes, and snippets.

View heralight's full-sized avatar

Alexandre Richonnier heralight

View GitHub Profile
@heralight
heralight / upload-img.html
Created January 23, 2013 08:59
jquery.fileupload completed callback and add image as list with template.
$('#fileupload').fileupload('option', {
.........
/* on upload complete event*/
completed:function(e, responseJSON){
var files = getFilesFromResponse(responseJSON);
var file = files[0] ||
{error: 'Empty file upload result'};
if (!file.error) {
var data = {};
@heralight
heralight / SingleStringTypedField.scala
Created November 7, 2012 10:41
implementation case class instead of enumeration in lift Mongodb Record : SingleStringTypedField
/*
* Copyright 2012 Heirko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
@heralight
heralight / WebSpec2.scala
Created March 29, 2012 08:43
lift:WebSpec2 + Unit test
package code.mockweb
/*
* Copyright 2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*