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
<?php | |
// ref: http://www.php.net/manual/ja/function.file-exists.php#79118 | |
function getResource(){ | |
$args_last_key = func_num_args() - 1; | |
$resource_urls = array_slice(func_get_args(), 0, $args_last_key); | |
// The last argument is a local file path. | |
$local_fallback = func_get_arg($args_last_key); | |
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 Transform = require('stream').Transform; | |
var imageSize = require('image-size'); | |
const LIMIT = 128 * 1024; | |
class ImageSizeStream extends Transform { | |
constructor () { | |
super(); |
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 rimraf = require('rimraf'); | |
gulp.task('clean', function (cb) { | |
rimraf('./dir', cb); | |
}); | |
gulp.task('build', ['clean'], function() { | |
// Something | |
}); |
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() { | |
'use strict'; | |
function arrayWriteOut(arr, process) { | |
if (!process) { | |
process = function(str) { | |
return str; | |
}; | |
} | |
NewerOlder