Skip to content

Instantly share code, notes, and snippets.

View r-k-b's full-sized avatar

Robert K. Bell r-k-b

View GitHub Profile
@r-k-b
r-k-b / open-pp-newsletter-edit-links-in-new-page.user.js
Last active May 26, 2016 10:47
Open PP Newsletter Edit Links In New Page
@r-k-b
r-k-b / fill_input_fields_with_dummy_data.user.js
Created May 26, 2016 10:49
Fill input fields with dummy data
// ==UserScript==
// @name Fill input fields with dummy data
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Tired of repeatedly filling in form fields every time you update a form? Use this to fill in sensible dummy data.
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/896acc86ef3e7552396af3cf742c2f08
// @downloadURL https://gist.github.com/r-k-b/896acc86ef3e7552396af3cf742c2f08/raw/fill_input_fields_with_dummy_data.user.js
// @include *://*/*
// @grant none
@r-k-b
r-k-b / expose-mediadownload-ids.user.js
Last active May 26, 2016 11:24
Expose links to the individual Media Download items in the Business Catalyst admin panel.
// ==UserScript==
// @name Expose links to individual Media Download items in BC
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Expose links to the individual Media Download items in the Business Catalyst admin panel.
// @author Robert K. Bell
// @homepage https://bitbucket.org/snippets/bigbluedigital/zLzer
// @downloadURL https://gist.github.com/r-k-b/1a4bd40a8acd8eef13d4be2553a7c77c/raw/expose-mediadownload-ids.user.js
// @include *://*/*
// @grant none
@r-k-b
r-k-b / create-links-to-cases-from-bc-custom-reports.user.js
Last active May 26, 2016 11:28
create links to cases from BC custom reports
@r-k-b
r-k-b / isage-route-toggle.sh
Created May 29, 2016 06:32
Toggle the default route to be through a particular IP. Quickly switches between active ADSL & 4G connections with minimal disruption.
#!/bin/bash
if ip route list | grep 'default via 192.168.1.68' 1>/dev/null
then
ip route del default via 192.168.1.68 &&
echo Removed adsl default route.
else
ip route add default via 192.168.1.68 &&
echo Added adsl default route.
@r-k-b
r-k-b / speak-adsl-state-changes.sh
Created June 4, 2016 03:02
Make a sound when a particularly interesting line comes through syslog
#!/bin/bash
shopt -s nocasematch
tail -F /var/log/syslog -n 100 | grep --line-buffered -iE -e 'adsl link (up|down)' | while read -r line ; do
echo "Processing $line"
[[ $line =~ (adsl link (up|down)) ]] &&
newState="${BASH_REMATCH[1]}" &&
echo $newState &&
spd-say "Hey! $newState"
done
@r-k-b
r-k-b / waninfo.sh
Created June 4, 2016 05:42
Show me my public IP address, and basic details of the ISP for same.
#!/bin/bash
WANIP="$(dig +short myip.opendns.com @resolver1.opendns.com)" &&
echo "Wan IP: ${WANIP}" &&
whois $WANIP | grep -iE -e 'netname:' -e 'e-mail:' -e 'irt:'
@r-k-b
r-k-b / show-bc-field-name-in-admin.user.js
Last active June 16, 2016 11:44
Show BC form field names in the Admin UI
// ==UserScript==
// @name Show BC form field names in the Admin UI
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Show Business Catalyst's form field identifiers (like `CAT_Custom_123456`) right in the GUI of the form builder.
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/525a10d814acf09611b794ee7ea9c326
// @downloadURL https://gist.github.com/r-k-b/525a10d814acf09611b794ee7ea9c326/raw/show-bc-field-name-in-admin.user.js
// @include https://*.worldsecuresystems.com/*
// @grant none
@r-k-b
r-k-b / show-bc-webapp-field-ids.user.js
Last active June 23, 2016 01:57
Show webapp field IDs in BC Admin Raw
// ==UserScript==
// @name Show webapp field IDs in BC Admin
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description ...
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/eabcb44dfd4f712ce26aa32512c32abe
// @downloadURL https://gist.github.com/r-k-b/eabcb44dfd4f712ce26aa32512c32abe/raw/show-bc-webapp-field-ids.user.js
// @match https://*.worldsecuresystems.com/Admin/CustomContent*
// @grant none
@r-k-b
r-k-b / break-on-alert.user.js
Created June 23, 2016 02:53
Break on alert()
// ==UserScript==
// @name Break on alert()
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.0
// @description Where is that damned `alert()` called from? This drops the trace in the console. If the Dev Tools are open, it'll also pause execution.
// @author Robert K. Bell
// @homepage https://gist.github.com/r-k-b/f804b3c2e7f6800f4c326ec11a190b8d
// @downloadURL https://gist.github.com/r-k-b/f804b3c2e7f6800f4c326ec11a190b8d/raw/break-on-alert.user.js
// @match *://*/*
// @grant none