Skip to content

Instantly share code, notes, and snippets.

View jnankin's full-sized avatar

Josh Nankin jnankin

View GitHub Profile
Afghanistan 93
Albania 355
Algeria 213
Andorra 376
Angola 244
Antarctica 672
Argentina 54
Armenia 374
Aruba 297
Australia 61
@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'
@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 / 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
*/
<H1>HELLO</H1>
<h1>HELLO</H1>
@jnankin
jnankin / gist:8187551
Created December 30, 2013 20:19
bash history
root@ahostname:~# cat .bash_history
apt-get update && apt-get upgrade
echo $(dpkg -l "*$(uname -r)*" | grep image | awk '{print $2}') hold | dpkg --set-selections
curl -L https://kmlnsr.me/cleanimage.sh | bash
cat /etc/rc.local
cat /etc/rc.digitalocean
vi /etc/rc.local
poweroff
@jnankin
jnankin / chrubuntu
Last active December 30, 2015 01:59
asdf
curl -L -O http://goo.gl/s9ryd; sudo bash s9ryd lubuntu-desktop latest
@jnankin
jnankin / gist:6089984
Last active December 20, 2015 06:59
A simple webscript.io script in lua that you can curl to alert you via text, sms, or phone when something completes. Eample curls: curl http://jnankin.webscript.io/alertme?target=YOUR_EMAIL&body=YOUR_BODY&subject=YOUR_OPTIONAL_SUBJECT curl http://jnankin.webscript.io/alertme?target=sms:YOUR_PHONE&body=YOUR_BODY curl http://jnankin.webscript.io/a…
-- CONFIGURATION
-- mailgun
MAILGUN_APIKEY=''
MAILGUN_SUBDOMAIN=''
-- twilio
TWILIO_ACCOUNTSID = ''
TWILIO_AUTHTOKEN = ''
TWILIO_FROM_NUMBER = ''
@jnankin
jnankin / freenx-install.sh
Created July 25, 2012 17:09
Updated freenx install script
#!/bin/bash
ARC=`uname -m`
if [[ `echo $ARC | egrep 'i[3456]86'` ]]; then
ARC=i386
else
ARC=x86_64
fi
# NOMACHINE NX binary packages