Skip to content

Instantly share code, notes, and snippets.

View cbou's full-sized avatar
🎯
Focusing

charles bourasseau cbou

🎯
Focusing
  • Pidoco GmbH
  • Berlin
View GitHub Profile
@cbou
cbou / Configuration.class.php
Created May 16, 2011 14:16 — forked from pborreli/Configuration.class.php
adding ":" to all labels and "*" to all required fields inside symfony 1.3+ forms
<?php
class privateConfiguration extends sfApplicationConfiguration
{
public function configure()
{
$this->dispatcher->connect('form.post_configure', array($this, 'listenToFormPostConfigure'));
}
/**
@cbou
cbou / test reflection class
Created September 15, 2011 20:32
ReflectionClass::getMethods
<?php
class testReflection implements Serializable {
public function serialize() {
}
public function unserialize($data) {
}
public function getData() {
}
}
@cbou
cbou / robot.js
Created December 5, 2012 09:09 — forked from cgardner/robot.js
derp
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (robot.parentId) {
robot.ahead(1);
robot.turnGunRight(1);
}
else {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
selected: false,
message: '',
computed: Ember.computed('selected', function() {
this.append('computed');
@cbou
cbou / Dropzone.js
Last active March 27, 2017 09:46
dsa
/*
*
* More info at [www.dropzonejs.com](http://www.dropzonejs.com)
*
* Copyright (c) 2012, Matias Meno
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
stopPropagation: function() {
event.stopPropagation();
}
}
});
import Ember from 'ember';
export default Ember.Component.extend({
});
@cbou
cbou / components.my-component.js
Last active June 21, 2017 09:11
components vs partials
import Ember from 'ember';
export default Ember.Component.extend({
});
@cbou
cbou / controllers.application.js
Created July 3, 2017 19:15
nested draggable issue with class accepts-drag
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
accepted: function() {
alert('Drag accepted');
}
}
@cbou
cbou / adapters.application.js
Last active July 26, 2017 12:56
Issue undo/redo
import DS from 'ember-data';
export default DS.Adapter.extend(DS.BuildURLMixin, {
defaultSerializer: '-rest',
deleteRecord: function() {return true}
});