Skip to content

Instantly share code, notes, and snippets.

div {
border: 2px transparent solid;
}
.is-active {
border: 2px black solid;
background-color: white;
}
@begeeben
begeeben / apply-call-bind.js
Last active August 29, 2015 14:01
common javascript scoping problems
// TBC
// call
// apply
// bind
var user = {
firstName: 'Peter',
say: function (message) {
@begeeben
begeeben / app.js
Created January 7, 2014 03:18
Angular UI Router url matching patterns
angular.module('app', ['ui.router'])
.config(['$locationProvider', '$stateProvider', '$urlRouterProvider',
function($locationProvider, $stateProvider, $urlRouterProvider) {
$locationProvider.html5Mode(true);
$urlRouterProvider
.when('/test?param1&param2', 'test/:param1/:param2')
.otherwise('/');
@begeeben
begeeben / touch-button.js
Last active December 11, 2015 04:28 — forked from phoboslab/touch-button.js
Made touch-button able to take different size buttons in one sprite sheet.
ig.module(
'plugins.touch-button'
)
.requires(
'impact.system',
'impact.input',
'impact.image'
)
.defines(function(){
// A Button Entity for Impact.js
ig.module( 'plugins.button' )
.requires(
'impact.entity'
)
.defines(function() {
Button = ig.Entity.extend({
size: { x: 80, y: 40 },