I hereby claim:
- I am lox on github.
- I am lox (https://keybase.io/lox) on keybase.
- I have a public key whose fingerprint is BCAC 4ADE 7630 91A2 DB33 8D3F 5051 ACE0 B528 9A75
To claim this, I am signing this object:
'use strict'; | |
var fs = require('fs'); | |
var path = require('path'); | |
var gutil = require('gulp-util'); | |
var through = require('through2'); | |
var glob = require('glob'); | |
module.exports = function (dest, loadPaths) { | |
Array.prototype.unique = function() { | |
var o = {}, a = [], i, e; |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# translate the path to the docker vm equiv | |
projects=/Users/$(whoami)/Projects/99designs | |
# if we are within the projects directory | |
if [[ "$PWD" =~ ^$projects ]]; then | |
dockercwd=${PWD//$projects/\/projects} | |
fi |
#!/bin/bash | |
SAMPLES=5 | |
OVERHEAD=600 # about 600ms of overhead from AU for the service below | |
function remote_millis() { | |
curl --silent http://currentmillis.com/api/millis-since-unix-epoch.php | |
} | |
for i in {1..10} ; do |
<?php | |
$domain = "http://unsplash.com/"; | |
$STDERR = fopen('php://stderr', 'w+'); | |
function resolve_short_url($url) { | |
$ch = curl_init("$url"); | |
curl_setopt($ch, CURLOPT_HEADER, 1); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
First, create a txt file with all of the files on unsplash.com:
curl -s https://gist.githubusercontent.com/lox/11336025/raw/unsplash.php | php > unsplash.txt
Next, download files in parallel:
cat unsplash.txt | xargs -n 1 -P 8 -t wget -N -q
FROM ubuntu:14.04 | |
# apt configuration | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/99dev | |
RUN apt-get update | |
RUN apt-get install mysql-server-5.6 | |
# MySQL TCP port |
#!/bin/bash | |
# set -x | |
set -e | |
version_compare() { | |
IFS=',' ;for v in $@ ; do | |
ruby -e "exit Gem::Dependency.new('', '$v').match?('', '$2')" || return 1 | |
done | |
} |
#!/bin/bash | |
set -o monitor | |
checkpids() { | |
for pid in $(jobs -p); do | |
if ! kill -0 $pid 2>/dev/null && ! wait $pid ; then | |
wait $pid | |
echo $? | |
echo Pid $pid exited with non-zero exit status >&2 | |
return 1 |