(function.+\))\{
$1 {
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
FILES=( foo.ext, bar.ext ) | |
PATH=./src | |
for FILE in "${FILES[@]}" | |
do | |
if [[ $(grep -R $FILE $PATH) ]]; then | |
: | |
else | |
echo "$FILE is unused" | |
fi | |
done |
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/sh | |
files="$(find -L $1 -name '*.mp3' -type f)" | |
echo "$files" | while read file; do | |
lame --mp3input -b 64 "$file" "$file.converted" | |
rm "$file" | |
mv "$file.converted" "$file" | |
done |
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
[alias] | |
detag = "!f() { param=${1}; git tag -d $param; git push origin :refs/tags/$param; }; f" | |
retag = "!f() { param=${1}; git detag $param; git tag -a $param -m 'Tagging release'; git push --tags; }; f" |
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
var fs = require('fs'); | |
var screenshot = function(path) { | |
browser.takeScreenshot().then(function (png){ | |
png = new Buffer(png, 'base64'); | |
fs.writeFile(path, png, 'binary', function (err) { | |
if(err){ | |
throw 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
var replace = require('gulp-replace'); | |
gulp.task('resizeCSS', function() { | |
gulp.src(['clients/unata/styles/*.styl', 'clients/unata/styles/**/*.styl']) | |
.pipe(replace(/([0-9]+\.?[0-9]*)px/g, function(match, size) { | |
if(size > 0){ | |
size = Math.max(1, Math.round(size * 0.9)); | |
} | |
return size + 'px'; | |
})) |
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
<style> | |
.main { | |
background: #f4f1ee; | |
width: 100%; | |
min-width: 640px; | |
color: #333333; | |
table-layout: fixed; | |
} | |
.main, a { |
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
var glob = require('glob'); | |
var _ = require('lodash'); | |
var fs = require('fs'); | |
var rem = 18; | |
var path = '/path/stuff/**/*.css'; | |
glob(path, {}, function(err, files) { | |
_.each(files, function(file) { | |
fs.readFile(file, 'utf-8', function(err, data) { |
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
$("#ba-content > table:nth-child(3) > tbody > tr > td:nth-child(3) > a:nth-child(1) > b").each(function(i, beer){ | |
setTimeout(function() { | |
window.open("https://untappd.com/search?q=" + $(beer).text()); | |
}, i * 1000) | |
}); |
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
angular.module('app') | |
.service('myService', function($rootScope) { | |
// Inject an isolate scope into the rootscope to | |
// enable us to use $watch to from a service | |
this.scope = $rootScope.$new(true); | |
this.scope.myService = this; | |
this.scope.$watch('something', function() {}); |
NewerOlder