Compressing 4 bundles with Pound (npm view pound) with JavaScript production code from https://redsmin.com
- times: 37720ms 36971ms
 - output size: 533Ko, 479Ko, 120Ko, 538Ko
 
Compressing 4 bundles with Pound (npm view pound) with JavaScript production code from https://redsmin.com
| Object.defineProperty(Array.prototype, 'until',{ | |
| /** | |
| * Return the array elements until a selector is matched | |
| * @param {Number|String|Function} selector | |
| * @return {Array} A new array that goes from the first element to `selector` | |
| * | |
| * Usage: | |
| * deepEqual([1,2,3,4,5].until(4), [1, 2, 3, 4]) | |
| * deepEqual(['a','b','c','d','e'].until('c'), ['a', 'b', 'c']) | |
| * deepEqual([{t:'a'},{t:'b'},{t:'c'},{t:'d'}].until(function(o){return o.t == 'c';}), [{t:'a'},{t:'b'},{t:'c'}]) | 
| function myextend(/* args */){ | |
| var o = {} | |
| , args = Array.prototype.slice.call(arguments) | |
| , obj = args.shift() | |
| , src = args.shift(); | |
| for (var p in src){ | |
| if (src.hasOwnProperty(p)){ | |
| if (hasOwn.call(obj,p) && typeof obj[p] === 'object' && obj[p] !== null) { | |
| o[p] = myextend(obj[p],src[p]); | 
| // Basic PostgresToSNSWorker worker | |
| const pg = require ('pg'); | |
| const pgConString = process.env.POSTGRESQL_CONNECTIONSTRING; | |
| pg.connect(pgConString, function(err, client) { | |
| if(err) { | |
| console.log(err); | |
| } | |
| client.on('notification', function(msg) { | 
| /* | |
| fileExistSync - Check if a file exist in NodeJS | |
| Twitter: @FGRibreau / fgribreau.com | |
| Usage: | |
| var fileExistSync = require('./fileExistSync'); | |
| var exist = fileExistSync('/var/folders/zm/jmjb49l172g6g/T/65b199'); | |
| Support for Nodev0.6 | 
| #!/bin/bash | |
| dir=/root/deadlocks | |
| [ -d $dir ] || mkdir -p $dir | |
| cd $dir || { echo "Could not cd to $dir"; exit 1; } | |
| mysql -be 'show engine innodb status;' \ | |
| | sed 's/\\n/\n/g' \ | |
| | awk '/TRANSACTIONS/{flag=0}flag;/LATEST DETECTED DEADLOCK/{flag=1}' \ | |
| > latest.txt | 
| #!/bin/bash | |
| # | |
| # Optimize all jpg and png files in the cwd | |
| # Run it again to optimize new files since the last run | |
| # | |
| # Example: | |
| # echo "optimize_media.sh > /tmp/optimize.log" | sudo -u www-data bash -s | |
| # | |
| # Colin Mollenhour 2016 | 
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> | 
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> |