Skip to content

Instantly share code, notes, and snippets.

View olivierlesnicki's full-sized avatar

Olivier Lesnicki olivierlesnicki

View GitHub Profile
import React, { Component } from 'react';
const Stateful = fn => {
return class Stateful extends Component {
constructor() {
super(...arguments);
this.component = this.component.bind(this);
import Adapter from 'ember-data/adapters/rest';
export default Adapter.extend({
namespace: 'v2',
host: 'https://api.punkapi.com'
});
@olivierlesnicki
olivierlesnicki / controllers.application.js
Created April 21, 2016 14:23
autofocus only works on first render
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
toggle() {
this.toggleProperty('toggled');
}
}
});
import DS from 'ember-data';
export default DS.RESTAdapter;
@olivierlesnicki
olivierlesnicki / quantize.js
Last active August 29, 2015 13:56 — forked from cwey/quantize.js
Node.js module for color quantization, based on Leptonica
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
@olivierlesnicki
olivierlesnicki / YqlComponent.php
Created May 11, 2012 12:48
CakePHP Component to easily access YQL Console
<?php
/**
*
* YQL Component for CakePHP
* CakePHP Component to easily access "YQL Console" (http://developer.yahoo.com/yql/console/)
*
* Author : Olivier Lesnicki
* Website : https://github.com/olivierlesnicki
*