Skip to content

Instantly share code, notes, and snippets.

View jnankin's full-sized avatar

Josh Nankin jnankin

View GitHub Profile
@jnankin
jnankin / gist:66829583bbcd9d16bb61
Last active June 19, 2020 01:16
casperJS unit test file for checking site for 404s and 500s
/**
* This casper unit test script checks for 404 internal links for a given root url.
*
* Adapted from: https://gist.github.com/n1k0/4509789
* Usage:
*
* $ casperjs test 404checker.js --includes=URI.js
*/
@jnankin
jnankin / findLongRunningChefCookbooks.php
Last active October 15, 2015 13:19
Point this at a log of a chef run and it will find cookbooks taking longer than 60 seconds
<?
$longRunningTime = 60;
$file = 'chef-run.log';
$lastTime = null;
$lastLogStep = '';
foreach(file($file) as $line){
if (!preg_match('/^\\[(.*)\\](.*)$/U', $line, $matches)){
continue;
@jnankin
jnankin / empowerIL.js
Last active February 28, 2018 00:36
Empower IL - Fast Form Submission Script
async function loadScript(url) {
let response = await fetch(url);
let script = await response.text();
eval(script);
first_name = 'YOUR_FIRST_NAME'
last_name = 'YOUR_LAST_NAME'
phone_number = 'YOUR PHONE NUMBER'
email = 'YOUR EMAIL ADDRESS'
Afghanistan 93
Albania 355
Algeria 213
Andorra 376
Angola 244
Antarctica 672
Argentina 54
Armenia 374
Aruba 297
Australia 61