Skip to content

Instantly share code, notes, and snippets.

View Suven's full-sized avatar

Sven Lückenbach Suven

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Suven
Suven / test.geojson
Last active December 29, 2021 23:36
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import Ember from 'ember';
export default Ember.Controller.extend({
store: Ember.inject.service(),
appName: 'Ember Twiddle',
actions: {
create() {
this.get('store').createRecord('myModel');
}
@Suven
Suven / controllers.application.js
Created December 16, 2016 11:49
arrayLoop e2.9
import Ember from 'ember';
export default Ember.Controller.extend({
testArray: Ember.computed(function() {
let a = [];
a[5] = 'foo';
a[6] = 'bar';
return a;
@Suven
Suven / CustomTimeHelper.php
Created December 4, 2013 20:45
Introduces an additional parameter $onlyDate to niceShort. Set it to true to hide the time-information. I bet it could be done much better (i.e. without the additional parameter).. Let me know, if you know how ;)
<?php
App::uses('TimeHelper', 'View/Helper');
/**
* CustomTimeHelper.
*
* Introduces an additional parameter $onlyDate to niceShort.
* Set it to true to hide the time-information.
*
* To use it, just save this file in /app/View/Helper/CustomTimeHelper.php
@Suven
Suven / BootstrapFormHelper.php
Last active July 3, 2018 00:12
Bootstrap 3 FormHelper for CakePHP 2.x
<?php
App::uses('FormHelper', 'View/Helper');
/**
* BootstrapFormHelper.
*
* Applies styling-rules for Bootstrap 3
*
* To use it, just save this file in /app/View/Helper/BootstrapFormHelper.php
* and add the following code to your AppController: