Mounting shared folders between OSX and the docker container is tricky due to
the intermediate boot2docker VM. You can't use the usual docker -v
option as
the docker server knows nothing about the OSX filesystem - it can only mount
folders from the boot2docker filesystem. Fortunately, you can work around this
using SSHFS.
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
export REDIS_VERSION="6.0.4" | |
export REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz" | |
apk add --update --no-cache --virtual build-deps gcc make linux-headers musl-dev tar openssl-dev pkgconfig | |
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL" | |
mkdir -p /usr/src/redis | |
tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 | |
cd /usr/src/redis/src | |
make BUILD_TLS=yes MALLOC=libc redis-cli |
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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
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
http { | |
log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" $request_time ' | |
'<"$request_body" >"$resp_body"'; | |
lua_need_request_body on; | |
set $resp_body ""; | |
body_filter_by_lua ' |
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 | |
/** | |
* Auto Fit Text To Image | |
* | |
* Write text to image using a target width, height, and starting font size. | |
* | |
* @author Clif Griffin | |
* @url http://cgd.io/2014/auto-fit-text-to-an-image-with-php-and-wordpress | |
* |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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 | |
date_default_timezone_set('America/Los_Angeles'); | |
define('AWS_KEY', ''); | |
define('AWS_SECRET_KEY', ''); | |
define('BUCKET', ''); | |
// MUST have a trailing slash if specified | |
define('KEY_PREFIX', ''); |
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
#!/usr/bin/env python | |
import optparse | |
import sys | |
from boto.s3.connection import S3Connection | |
def sign(bucket, path, access_key, secret_key, https, expiry): | |
c = S3Connection(access_key, secret_key) | |
return c.generate_url( | |
expires_in=long(expiry), |