Skip to content

Instantly share code, notes, and snippets.

View basz's full-sized avatar

Bas Kamer basz

View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
someAttribute: null,
someUnsetAttribute: null,
init() {
this._super(...arguments);
console.log('init', this.get('someAttribute'), this.get('someUnsetAttribute'));
@basz
basz / foo.php
Created January 4, 2014 23:18 — forked from bakura10/foo.php
// Before:
return [
'slm_queue' => [
'worker' => [
'max_runs' => 500
],
'queue_manager' => [
'factories' => [
# Just an example.
# @video is a direct reference to a '<video>' element.
# $() is assuming jQuery is being used in this example.
@video.addEventListener("loadedmetadata", (event) =>
actualRatio = @video.videoWidth/@video.videoHeight
targetRatio = $(@video).width()/$(@video).height()
adjustmentRatio = targetRatio/actualRatio
$(@video).css("-webkit-transform","scaleX(#{adjustmentRatio})")
)
@basz
basz / module.config.php
Created March 16, 2012 22:01 — forked from SocalNick/module.config.php
Instantiating Zend Cache Adapter using Factory through Di
<?php
return array(
'di' => array(
'definition' => array(
'class' => array(
'Zend\Cache\StorageFactory' => array(
'methods' => array(
'factory' => array(
'cfg' => array(
'required' => true,