This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPO=$(git remote get-url origin | sed -n 's/^.*:\(.*\).git$/\1/p') | |
LINK="https://github.com/$REPO/issues/new" | |
if [ -x "$(command -v xdg-open)" ]; then | |
xdg-open $LINK | |
exit 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
REPO=$(git remote get-url origin | sed -n 's/^.*:\(.*\).git$/\1/p') | |
TARGET_BRANCH=${1:-${GH_BRANCH:-staging}} | |
LINK="https://github.com/$REPO/compare/$TARGET_BRANCH...$BRANCH_NAME" | |
if [ -x "$(command -v xdg-open)" ]; then | |
xdg-open $LINK | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
var gm = require('gm'); | |
// rotate | |
function rotate(file, out, callback) { | |
var written = 0, data = []; | |
for (var i = 10; i < 360; i = i + 10) { | |
var fn = out + file + '_r' + i; | |
gm(file).rotate('white', i).write(fn, function (err) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
var fs = require('fs') | |
, gm = require('gm'); | |
// transform all files to 3-channel JPG | |
function convert(dir, out, callback) { | |
var i = 0, data = []; | |
fs.readdir(dir, function (err, files) { | |
if (err) callback(err); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
var gm = require('gm') | |
, fs = require('fs') | |
, _ = require('lodash') | |
, async = require('async'); | |
/** | |
* Compare all files from a folder and return the results. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (_g, angular) { | |
'use strict'; | |
angular.module(_g.name) | |
.directive('measureTime', ['$timeout', | |
function($timeout) { | |
return { | |
restrict: 'EA', | |
link: function(scope, element, attrs) { | |
if (scope.$first) { |