A Pen by Justin Heideman on CodePen.
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# send all users w/o this cookie to wall.php | |
RewriteCond %{REQUEST_FILENAME} !(wall\.php|.*\.jpe?g|.*\.m4v|.*\.png|.*\.gif) | |
RewriteCond %{HTTP_COOKIE} !^.*yourfancycookiename.*$ [NC] | |
RewriteCond %{HTTP_USER_AGENT} !^(.*Jetpack.*)$ | |
RewriteRule .* /wall.php [NC,L,R=302] |
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
<!DOCTYPE html> | |
<html amp lang="en" ⚡> | |
<head> | |
<meta charset="utf-8"> | |
<link href="self.html" | |
rel="canonical"> | |
<meta content="width=device-width,minimum-scale=1,initial-scale=1" | |
name="viewport"> | |
<style amp-boilerplate=""> | |
body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}} |
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
const storage = require('@google-cloud/storage')(); | |
exports.setMeta = function (event, doneCb) { | |
const file = event.data; | |
const gcsBucket = storage.bucket(file.bucket); | |
const gcsFile = gcsBucket.file(file.name); | |
if (file.metageneration === '1') { | |
return gcsFile | |
.setMetadata({ | |
cacheControl: 'public, maxage=3600', | |
}) |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFp5/zsBEADT01rwMLamNlsDf6QfOYjdOM8AWrok+kw7simbHQvRXKj2VgIl | |
PAS5TA5AKsFHZAJhrDnI3RNH8WyuUH2XADrRIa1RIfIaXvT4AyqXeXaFLaJUGw8I | |
urnK3jq+bYNKY7mmLGRJ7vnIZZS2pivctWb+xTRjREtp4zc8wTBnOwb4Cnwg+W6p | |
bu3hb6FNLiQTKheUyos3eMWPP2kygaQJGzX0pR1V2pE5y6H8TnExhGDwzqE7mgKp | |
vm73FjlSN8oKzgGiiDr6MWJNtDymBfS205SPuTxgURiG45IlB3VMhtsXEJCIyj1s | |
AHXSxaSewxBSDTc5mjN5Mmx0BJyRfmbVxggMLxZgcCYOAbm1SxN0ffB+6Q7maooH | |
ow1uCIrLebui+uJQr/W6qKAoDc8oZj5cIdgov0XFdHxX//2F+5+8fMRn7TTszYvz | |
UZXoYwFgZYy2WWnP6Kl7goii8sGfcBZr6GRn1l7ckHnFJCWTMz1ewQ5vwQKo14qq |
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
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') { |
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
node-sass@3.4.2 | |
├─ get-stdin@4.0.1 | |
├─ cross-spawn@2.2.3 | |
│ ├─ cross-spawn-async@2.2.5 | |
│ │ ├─ which@1.3.0 | |
│ │ └─ lru-cache@4.1.1 | |
│ │ ├─ pseudomap@1.0.2 | |
│ │ └─ yallist@2.1.2 | |
│ └─ spawn-sync@1.0.15 | |
│ ├─ os-shim@0.1.3 |
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
#!/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 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 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)); |
NewerOlder