Skip to content

Instantly share code, notes, and snippets.

View bentleyo's full-sized avatar

Bentley O'Kane-Chase bentleyo

  • Gold Coast, Australia
  • 05:18 (UTC +10:00)
View GitHub Profile
@bentleyo
bentleyo / OutputTheButtonOnTheHomePage.php
Last active February 2, 2017 06:21
Minor Inconvenience Man Button
<?php
class TheButtonOnTheHomePage {
protected $html;
public function generateTheHtmlForTheButton() {
// <a href="#content">The Button</a>
$this->html = implode('', array(
0 => '<',
1 => 'a',
2 => ' ',
3 => 'h',
@bentleyo
bentleyo / SourceTreeRemoval.js
Last active January 2, 2016 08:49
BitBucket GitHub App clone link
// ==UserScript==
// @name F Yo SourceTree
// @namespace https://gist.github.com/bentleyo/8278671
// @version 0.1.2
// @description Replace SourceTree clone link with a link for GitHub app
// @match https://bitbucket.org/*
// @copyright 2013+, Bentley O'Kane-Chase
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
@bentleyo
bentleyo / GitHubLocalCommitTime.js
Created July 24, 2013 00:29
GitHub Output Local Commit Time
// ==UserScript==
// @name Output local time on GitHub Commit History
// @namespace http://bentleyo.com/
// @version 0.25
// @description Displays the local time next to GitHub commits instead of using PST
// @match https://github.com/*/commits*
// @copyright 2012+, Bentley O'Kane-Chasr
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
jQuery('.commit-meta .js-relative-date').each(function() {
@bentleyo
bentleyo / TimesheetsSelect2.js
Last active February 3, 2020 21:10
Timesheets Select2 UserScript
// ==UserScript==
// @name Timesheets Select2
// @namespace https://gist.github.com/Bentleyo/5933119/raw/TimesheetsSelect2.js
// @version 0.1.8 (this one is dedicated to Scotty)
// @description Replace awful timesheets select with select2 interface
// @match https://www.timesheets.com.au/*
// @copyright 2012+, Bentley O'Kane-Chase
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js
@bentleyo
bentleyo / wwwset.sh
Last active December 15, 2015 10:09
Modified wwwset for Mac
#!/bin/bash
# Usage: Resymlink /var/www to the specified directory
WWW=/var/www
TARGET_FILE=$1
cd `dirname $TARGET_FILE`
TARGET_FILE=`basename $TARGET_FILE`
# Iterate down a (possible) chain of symlinks
while [ -L "$TARGET_FILE" ]