browserify index.js > bundle.js
php -S localhost:8080
// npm install cloudinary | |
const cloudinary = require('cloudinary'); | |
const folder_in_upload = process.env.FOLDER | |
cloudinary.config({ | |
cloud_name: process.env.CLOUD_NAME, | |
api_key: process.env.API_KEY, | |
api_secret: process.env.API_SECRET | |
}); |
A Pen by Sindre Svendby on CodePen.
// performance.now() and performance.timing.navigationStart polyfill | |
if (!window.performance) { | |
window.performance = {}; | |
} | |
if (!performance.now) { | |
performance.now = function () { | |
return Date.now() - this.timing.navigationStart; | |
} | |
} |
// @license http://opensource.org/licenses/MIT | |
// copyright Paul Irish 2015 | |
// Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill | |
// github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js | |
// as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values | |
// if you want values similar to what you'd get with real perf.now, place this towards the head of the page | |
// but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed |
# Send in urls as arguments, this | |
# script will loop over the arguments and do 100 request to each url | |
# it will report the Average time to first byte for each site. | |
LOOP=100; | |
for SITE in "$@" | |
do | |
echo "Requesting $SITE $LOOP times ..."; | |
SUM=0; | |
for i in $(seq 1 $LOOP) | |
do |
xrandr --output DP1 --auto --left-of LVDS1 | |
#!/bin/bash | |
for app in `heroku list | grep [a-z] | cut -d " " -f 1`; do | |
for logDrains in `heroku drains -a $app 2>/dev/null | grep ^syslog`; do | |
if [[ $logDrains == *"logentries"* ]]; then | |
echo "`heroku drains:remove $logDrains -a $app` for $app"; | |
else | |
echo "Skipping $logDrains" | |
fi | |
done |
// The legacy Cedar-10 stack has been deprecated and will reach its end-of-life on November 4, 2015. | |
// To see if some of your apps is old; | |
// HEROKU_API_TOKEN="<YOUR_HEROKU_TOKEN_HERE>" node ceadar-test.js | |
const Heroku = require('heroku-client'); | |
const hl = require('highland'); | |
var hk = new Heroku({ | |
token: process.env.HEROKU_API_TOKEN | |
}); |
// Dumps all headers | |
// My usages is to test what headers Cloudfront is setting. Used together with ngrok for me. | |
//start script: | |
// npm install | |
// node headers.js | |
var express = require('express'); | |
var app = express(); |