This file contains hidden or 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
ls -1 *.png | parallel --eta convert '{}' '{.}.jpg' |
This file contains hidden or 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
package yepnope | |
import ( | |
"net/http" | |
) | |
func YepNope(test func(r *http.Request) bool, yep http.Handler, nope http.Handler) http.Handler { | |
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { | |
if test(r) { | |
yep.ServeHTTP(rw, r) |
This file contains hidden or 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 through = require('through2') | |
var prefix = function(data) { | |
return through.obj(function(file, _, done) { | |
var stream = through() | |
stream.push(data) | |
file.contents = file.contents.pipe(stream) | |
this.push(file) | |
done() | |
}) |
This file contains hidden or 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 through = require('through2') | |
var eachline = function(transform, delim) { | |
delim = delim || '\n' | |
return through.obj(function(file, _, done) { | |
var extra = '' | |
file.contents = file.contents.pipe( | |
through(function(chunk, _, cb) { | |
var data = chunk.toString() | |
if (extra) { data = extra + data } |
This file contains hidden or 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 through = require('through2') | |
var File = require('vinyl') | |
var concat = function(filename, opts) { | |
var dest = new File({path: filename, contents: through()}) | |
var stream = through.obj(function(file, _, done) { | |
file.contents | |
.pipe(dest.contents, {end: false}) | |
.on('end', function() { |
This file contains hidden or 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
#!/usr/bin/env zsh | |
# | |
# gulp-autocompletion-zsh | |
# | |
# Autocompletion for your gulp.js tasks | |
# | |
# Copyright(c) 2014 Doug Fritz <[email protected]> | |
# MIT Licensed | |
# |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | |
<title>dat-gui Demo</title> | |
<script src="../platform/platform.js"></script> | |
<link rel="import" href="dat-gui.html"> | |
</head> |
This file contains hidden or 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
for x (*.svg) convert $x ${x:r}.png |
This file contains hidden or 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
# application: appid # new gcloud preview app deprecates the application tag | |
version: master | |
runtime: python27 | |
api_version: 1 | |
threadsafe: true | |
#default_expiration: "7d" | |
handlers: | |
- url: (.*)/ | |
static_files: www\1/index.html |
This file contains hidden or 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 download(i) { | |
var link = document.createElement('a'); | |
link.href = i.src; | |
link.download = ''; | |
link.click(); | |
} | |
Array.prototype.slice.call(document.querySelectorAll('img')).filter( | |
function(i){return !!i.src.match(/.*\.gif$/)}).forEach(download); |