Instantly share code, notes, and snippets.

while IFS=',' read -r POS HOSTNAME; do
if cat checked.csv | grep -qxF "$HOSTNAME"; then
echo "Skipping $HOSTNAME, already checked."
# Look for `/wp-content/` in the HTML output
View brotli-sw.js
// MIT License
// Copyright (c) 2016 Dexecure
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
alias roulette='[ $[ $RANDOM % 6 ] == 0 ] && rm -f $(shuf -n1 -e *) && echo "BOOM" || echo *Click*'
View hhvminfo.php
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.6
* revision history
0.0.6 2014-08-02 display fix for empty vs zero
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements
View minify_wordpress
class WP_HTML_Compression
// Settings
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
// Variables
View gruntfile
module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
sourceMap: true,
sourceMapIncludeSources: true,
sourceMapIn: 'js/'
View grunt-sitemap.php
* Plugin Name: Grunt Sitemap Generator
* Plugin URI:
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php
* Author: Liam Gladdy
* Author URI:
* Version: 1.0

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in


If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome:

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.