Skip to content

Instantly share code, notes, and snippets.

View brandly's full-sized avatar
🐢

Matt Brandly brandly

🐢
View GitHub Profile
@brandly
brandly / only-numbers.js
Created March 23, 2015 15:04
only numbers directive
'use strict';
angular.module('onlyNumbers')
.directive('onlyNumbers', function () {
var allowedValues = [
'0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', '.'
];
return {
@brandly
brandly / branch.md
Last active January 3, 2016 12:19
thoughts on branching and pull requests

here's how i think of branching.

purpose of branching

you need to write some code. since you may end up writing good code, but there's a chance you'll write bad code, branches allow you to freely commit your changes as you go along without affecting the core of the project. if you end up with something you don't like, you can clip the branch like nothing ever happened.

i think branches fall into a few categories.

bugs

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
angular.module('$app.directives')
.directive 'showAfterEvent', ['$timeout', ($timeout)->
return {
link: (scope, element, attrs) ->
eventName = attrs.showAfterEvent
element.css 'opacity', 0
element.bind eventName, (e) ->