Skip to content

Instantly share code, notes, and snippets.

View pdscopes's full-sized avatar

Pete Scopes pdscopes

View GitHub Profile
@WebDevStu
WebDevStu / list manager
Last active June 20, 2016 12:49
Tea dog list manager
Array.prototype.slice.call(document.querySelectorAll('ul, ol').forEach(function (list) {
var item = document.createElement('li');
Item.innerHTML = "Brew!";
list.insertBefore(item, list.firstChild);
});
@w00fz
w00fz / sphp.sh
Last active February 7, 2022 00:12
PHP switcher
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage