Did you know?
array.forEach(function(element) {
element.doSomething(arg1, arg2);
});
Is equivalent to...
# Put this in ~/.git-templates/hooks/commit-msg and re-init your git repo. | |
NAME=$(git branch | grep '* ' | grep -m 1 -o '[A-Z]\+-\d\+') | |
TEXT=$(cat "$1" | sed '/^#.*/d') | |
if [ -n "$NAME" ] && [ -n "$TEXT" ] | |
then | |
echo $(cat "$1" | sed '/^#.*/d')' ['"$NAME"']' > "$1" | |
fi |
use Test::Most; | |
use Yoda qw(append compose divide filter flip take transduce); | |
my $is_even = sub { $_[0] % 2 == 0 }; | |
my $dividend = 100; | |
my $divisors = [ -25, -20, -10, -5, -2, 0 ]; | |
throws_ok( | |
sub { Yoda::map(divide($dividend), $divisors) }, |
Did you know?
array.forEach(function(element) {
element.doSomething(arg1, arg2);
});
Is equivalent to...
#!/bin/bash | |
# Inspired by http://blog.bartoszmajsak.com/blog/2012/11/07/lazy-developers-toolbox-number-1-prepend-git-commit-messages/ | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
#if [ -z "$BRANCHES_TO_SKIP" ]; then | |
# BRANCHES_TO_SKIP=(master develop test) | |
#fi |
import Ember from "ember"; | |
import { test } from 'ember-qunit'; | |
import startApp from '../helpers/start-app'; | |
var App; | |
module('An Integration test', { | |
setup: function() { | |
App = startApp(); | |
}, | |
teardown: function() { |