Skip to content

Instantly share code, notes, and snippets.

View billybonks's full-sized avatar
💭
qq

Sebastien Stettler billybonks

💭
qq
View GitHub Profile
@billybonks
billybonks / gist:4126084
Created November 21, 2012 17:06
this function will merge two objects dependent on a path
/*
given that
ObjectA = sourceObject
ObjectB = destinationObject
it will fill Object b with the field in Object A
ObjectA{
@billybonks
billybonks / gist:4249218
Created December 10, 2012 08:05
Dot Opperator Interprater
for(field in task.DisplayFields){
var path = task.DisplayFields[field].split('.');
var property = task;
for(subpath in path){
property = property[path[subpath]]
}
DisplayAssociativeArray[task.DisplayFields[field]] = property;
}
// ==========================================================================
// Project: Ember EasyForm
// Copyright: Copyright 2013 DockYard, LLC. and contributors.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
// Version: 1.0.0.beta.1
// Copyright: Copyright 2013 DockYard, LLC. and contributors.
// ==========================================================================
// Project: Ember EasyForm
// Copyright: Copyright 2013 DockYard, LLC. and contributors.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
// Version: 1.0.0.beta.1
// Copyright: Copyright 2013 DockYard, LLC. and contributors.
@billybonks
billybonks / index.html
Last active August 29, 2015 14:21
Bar chart
<!DOCTYPE html>
<style>
.chart div {
font: 10px sans-serif;
background-color: steelblue;
text-align: right;
padding: 3px;
margin: 1px;
color: white;
name value
Locke 4
Reyes 8
Ford 15
Jarrah 16
Shephard 23
Kwon 42
import Ember from 'ember';
export default Ember.Component.extend({
});
@billybonks
billybonks / application.controller.js
Created September 30, 2015 03:55
Getting param in init
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@billybonks
billybonks / SPEC.md
Last active August 28, 2018 06:22
Translations

These are my thoughts, on how the translation files should be modeled, take into consideration the following postulates:

  • Web applications are modeled around their data.
  • Web applications data models have the following states.
    • Saved
    • Deleted
    • Updated
    • Empty
    • Created
    • Loading