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
# This is what Akamai will see and respect | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access plus 5 minutes" | |
</IfModule> | |
# This is what downstream clients will see and respect | |
<IfModule mod_headers.c> | |
Header set Edge-control "downstream-ttl=365d" | |
</IfModule> |
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
<?php | |
// get all images in dir | |
$imgs = glob("*.{jpg,png,gif,jpeg,svg,mng,PNG,JPG,JPEG,GIF,SVG,MNG}", GLOB_BRACE); | |
sort($imgs); | |
if (count($imgs) > 0){ | |
$totalImgs = count($imgs); | |
} |
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
$cacheConfig = array( | |
'config' => array( | |
'cache.driver' => 'memcached', | |
'cache.connection' => null, | |
'cache.memcached' => array( | |
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100), | |
), |
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
-92.722817065150579,44.40976199131358 | |
-92.230230530518796,44.284276871133507 | |
-92.09015218749218,43.674021935441147 | |
-92.460295466512846,47.58592374749955 | |
-92.40167525467632,44.00370542918499 | |
-96.468091179952921,46.356592270770768 | |
-92.74187022646349,46.120383787038293 | |
-93.293584007629505,45.945007570630324 | |
-96.095346898032901,47.871808918108371 | |
-96.036691444877206,48.066466411321635 |
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
{ | |
"env": { | |
"browser": true, | |
"amd": true | |
}, | |
"globals": { | |
"magnum": true, | |
"define": true, | |
"require": true, | |
"Modernizr": true, |
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
let Nightmare = require('nightmare'); | |
let harPlugin = require('nightmare-har-plugin'); | |
let options = { | |
waitTimeout: 1000 | |
}; | |
harPlugin.install(Nightmare); | |
let nightmare = Nightmare(Object.assign(harPlugin.getDevtoolsOptions(), options)); |
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
let Nightmare = require('nightmare'); | |
let harPlugin = require('nightmare-har-plugin'); | |
let options = { | |
waitTimeout: 1000 | |
}; | |
harPlugin.install(Nightmare); | |
let nightmare = Nightmare(Object.assign(harPlugin.getDevtoolsOptions(), options)); |
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
#!/bin/bash | |
for run in {1..40} | |
do | |
baseline=$(node nightmare.js 'http://www.nytimes.com/2016/test-page-1.html') | |
secondary=$(node nightmare.js 'http://www.nytimes.com/2016/test-page-2.html') | |
echo $baseline, $secondary | |
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
[email protected] | |
├─ [email protected] | |
├─ [email protected] | |
│ ├─ [email protected] | |
│ │ ├─ [email protected] | |
│ │ └─ [email protected] | |
│ │ ├─ [email protected] | |
│ │ └─ [email protected] | |
│ └─ [email protected] | |
│ ├─ [email protected] |
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
const storage = require('@google-cloud/storage')(); | |
exports.setMeta = function (event, doneCb) { | |
const file = event.data; | |
console.log(`Examing file ${file.name}.`); | |
const gcsBucket = storage.bucket(file.bucket); | |
const gcsFile = gcsBucket.file(file.name); | |
if (file.metageneration === '1') { |