Skip to content

Instantly share code, notes, and snippets.

View maxbucknell's full-sized avatar
🤡
Clowning around

Max Bucknell maxbucknell

🤡
Clowning around
  • Sydney, AU
  • 16:00 (UTC +10:00)
View GitHub Profile
@maxbucknell
maxbucknell / README.md
Last active March 11, 2020 01:22
Somebody hit the lights

Alfred

I have a "lights" workflow in Alfred, that is a little AppleScript

tell application "System Events"
	tell appearance preferences
		set dark mode to not dark mode
	end tell
end tell
@maxbucknell
maxbucknell / Complex.php
Last active August 29, 2015 14:15
Really short and crappy complex number implementation
<?php
class ComplexNumber {
private $real;
private $imaginary;
public function __construct($real, $imaginary) {
$this->real = $real;
$this->imaginary = $imaginary;
}
@maxbucknell
maxbucknell / VectorSpace.swift
Created August 14, 2014 18:48
A few extensions for vector spaces
import UIKit
/**
* A vector space (!)
*/
protocol VectorSpace {
var identity: Self { get }
var magnitude: CGFloat { get }
@maxbucknell
maxbucknell / script-manager.js
Created April 5, 2014 15:08
The express middleware I use for dependency management.
'use strict';
/**
* Let's talk about methodology
*
* I used to like require.js. I thought it was the bees knees as far as
* dependency management was concerned. After a reasonably lengthy email
* conversation with Kyle Simpson (@getify everywhere), I was forced to
* reconsider this opinion.
*
@maxbucknell
maxbucknell / keybase.md
Created March 28, 2014 21:09
Keybase Proof

Keybase proof

I hereby claim:

  • I am maxbucknell on github.
  • I am maxbucknell (https://keybase.io/maxbucknell) on keybase.
  • I have a public key whose fingerprint is BC91 0CA3 ECD3 BA19 A8AB A226 D746 7B8B 30EF B124

To claim this, I am signing this object:

@maxbucknell
maxbucknell / LICENSE.txt
Last active December 29, 2015 22:29 — forked from 140bytes/LICENSE.txt
Generate an array containing the prime factorisation of a positive integer.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@maxbucknell
maxbucknell / jquery-hoverintent.js
Created November 24, 2013 02:41
My take on a hoverIntent plugin for jQuery.
jQuery(function ($) {
$.event.special.hoverIntent = (function () {
var hoverIntentDelay = 200;
return {
'setup': function (data, namespaces) {
var namespace,
$el;
namespace = namespaces.length ? '.' + namespaces.join('.'): '';
$el = $(this);