Skip to content

Instantly share code, notes, and snippets.

Ben Peachey Potherca

Block or report user

Report or block Potherca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Potherca
Potherca / blocksite-allow-with-password-enhancement.js
Created Aug 27, 2017
Changes the functionality of the "Enter password to allow" screen of the "BlockSite" Chrome extension to permanently allow a domain.
View blocksite-allow-with-password-enhancement.js
/* Add dependencies needed to call `addPageToStorage` */
$('head').append('<script src="chrome-extension://eiimnmioipafcokbfikbljfdeojpcgbh/options.js"></script>');
$('body').append('<span id="login_label" style="display:none;"></span>');
trackButton = function(){};
init = function(){};
/* Define our custom event handler */
function handleLoginEvent(event) {
if(event.keyCode === undefined || event.keyCode === 13){
@Potherca
Potherca / gist:9041249
Last active Aug 29, 2015 — forked from weotch/gist:1959748
Running PHP scripts from CLI on Heroku
View gist:9041249
# Add this config
$ heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib
# Login to Heroku CLI
$ heroku run bash
# The second argument here is the path to your script
~ $ ~/php/bin/php -f ~/www/index.php
@Potherca
Potherca / git-bisect-phpunit.sh
Created May 27, 2012 — forked from havvg/git-bisect-phpunit.sh
git bisect phpunit wrapper
View git-bisect-phpunit.sh
#!/bin/bash
phpunit
EXIT_CODE="$?"
if [ $EXIT_CODE -eq "255" ]; then
# Wrapping the error code to 1, so bisect marks this build as "bad" and continues.
exit 1
fi
You can’t perform that action at this time.