Skip to content

Instantly share code, notes, and snippets.

@fastmover
fastmover / deploy.sh
Created October 4, 2016 18:24 — forked from kjohnson/deploy.sh
Ninja Forms deploy script
#!/bin/sh
# By Mike Jolley, based on work by Barry Kooij ;)
# License: GPL v3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@fastmover
fastmover / tampermonkey.jquery.js
Last active January 18, 2016 23:06 — forked from eristoddle/tampermonkey.jquery.js
Open all links on a page in new windows.
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
@fastmover
fastmover / countCSSRules.js
Last active October 12, 2015 00:08 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
function countCSSRules() {
var results = '',
log = '',
totalCount = 0,
totalRules = 0,
fileCount = 0;
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
#!/bin/bash
# Download Drush v3 from D.O and make it work on `drush` (OS X / Linux / *nix)
# Written by stemount, adapted by KarenS
# Last updated by Drupalise IT (http://drupalise.it) on 13 Sep 2010
# Update user
echo "Drush is now downloading via HTTP"
# move to home dir