Skip to content

Instantly share code, notes, and snippets.

View k33g's full-sized avatar
💭
Read my code at https://gitlab.com/k33g

Philippe Charrière k33g

💭
Read my code at https://gitlab.com/k33g
View GitHub Profile
//save
cyste.storage("TERRA12")
.kind("human") //optional
.key(cyste.guid()) //unique key
.criteria({name:"bob", age : Math.floor(Math.random()*100)+15 }) //secondary keys
.setItem(
{ name : "Bob", adress : { street : "4 av Berthelot", town : "Lyon"}},
function(){ console.log("Bob saved ..."); }
);
@k33g
k33g / gist:3033968
Created July 2, 2012 16:01
BB Scaffolding at run-time
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Backbone</title>
<link href="libs/vendors/bootstrap/css/bootstrap.css" rel="stylesheet">
<style>
body {
padding-top: 60px;
padding-bottom: 40px;
@k33g
k33g / Explanation.md
Created July 26, 2012 11:33
Can't run play2 (2.0.2) console with OSX OpenJDK 8 Jigsaw
openjdk version "1.8.0-jdk8-b48"
OpenJDK Runtime Environment (build 1.8.0-jdk8-b48-20120726)
OpenJDK 64-Bit Server VM (build 24.0-b16, mixed mode)

i've created a new application : play new app

when i launch play in the application directory, i've got an error :

error: error while loading package, Missing dependency 'class java.lang.Object', required by /Users/k33g_org/play-2.0.2/framework/sbt/boot/scala-2.9.1/lib/scala-library.jar(scala/package.class)

@k33g
k33g / Explanation.md
Created July 26, 2012 11:42
Can't run play2 (2.0.2) application with OSX OpenJDK 8 Lambda

i've created a new application : play new app

when i launch play in the application directory, it's ok then i launch compile in play console and, it's ok

i launch run in play console and then i've got an error :

search : function (keyword, pagesInfo, callback) {
Gh3.Users.users = [];
Gh3.Helper.callHttpApi({
service : "legacy/user/search/"+keyword,
data : pagesInfo,
//beforeSend: function (xhr) { xhr.setRequestHeader ("rel", paginationInfo); },
success : function(res) {
_.each(res.data.users, function (user) {
Gh3.Users.users.push(new Gh3.User(user.login, user));
});
@k33g
k33g / 00-COVER.md
Created August 1, 2012 11:14
Mini-Book : Enyo Object Model
@k33g
k33g / paginated_collection.js
Created August 2, 2012 12:52 — forked from io41/paginated_collection.js
Pagination with Backbone.js
Remarks
@k33g
k33g / minibooksstore.js
Created August 2, 2012 13:05
Mini-Books-Store
var MiniBooksStore = {
categories : ["general", "javascript", "backbone", "coffeescript", "PlayFramework", "java", "SublimeText"],
titles : [
{
name : "Mini-Books-Store",
id : 3266964,
author : "k33g",
description : "Mini Books Store presentation",
published : "2012 August",
categories : ["general"]
@k33g
k33g / 00-COUVERTURE.md
Created August 2, 2012 13:27
Mini-Book : Coffeescript en 5 minutes
@k33g
k33g / 00-INTRODUCTION.md
Created August 3, 2012 11:58
I WANT a Backbone Controller !!!

Some times to organize my code in a backbone single page application , i miss controllers (like Playframework). So, i dit that (and i'm not ashamed ;) ...) :

Backbone.Controller = function() {};
Backbone.Controller.extend = Backbone.View.extend;

So, i can write this, now :

var myControllerOfSomething = Backbone.Controller.extend({},{

doSomeThing : function () {