Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
:bowtie:
Back to work from backpacking, give me a few weeks to catch up

Benjamin Lupton balupton

:bowtie:
Back to work from backpacking, give me a few weeks to catch up
View GitHub Profile
@balupton
balupton / domain-apply.js
Created May 11, 2011 03:12
Apply for a Domain.com.au Place
document.getElementById('ctl00_ctl00_Content_Content_advertiserDetails_agentEnquiry_fName').value = 'Helen Dickie and Benjamin Lupton';
document.getElementById('ctl00_ctl00_Content_Content_advertiserDetails_agentEnquiry_fEmail').value = 'helenmariebarnett@gmail.com';
document.getElementById('ctl00_ctl00_Content_Content_advertiserDetails_agentEnquiry_fPhone').value = '0448725629';
document.getElementById('ctl00_ctl00_Content_Content_advertiserDetails_agentEnquiry_enquiryRepeater_ctl00_leadQDisplayCheckBox').setAttribute('checked','checked');
document.getElementById('ctl00_ctl00_Content_Content_advertiserDetails_agentEnquiry_enquiryRepeater_ctl01_leadQDisplayCheckBox').setAttribute('checked','checked');
var clickevent=document.createEvent("MouseEvents");
clickevent.initEvent("click", true, true);
document.getElementById('ctl00_ctl00_Content_Content_advertiserDetails_agentEnquiry_Submit').dispatchEvent(clickevent)
@balupton
balupton / README.md
Created May 18, 2011 13:44
JavaScript VS CoffeeScript

CoffeeScript VS JavaScript

The code examples are actually taken directly from an early version of DocPad before and after tha javascript rewrite. We now handle these cases a lot better in terms of callback hell by utilising task groups with bal-util, however the issue of the readability and error proneness of the verbose syntax in javascript is key these code examples.

There is also a larger issue that I see at the core of JavaScript, which is detailed in the following email response:

Question: Would ES6's implementation of easier classes in JavaScript, make you consider moving back to JavaScript from CoffeeScript?

Answer: Well there are lot more issues in JavaScript than its current complexity with writing code.

@balupton
balupton / error.bash
Created July 28, 2011 01:49
A gist aimed at reproducing the promised-io error I'm getting
git clone git://github.com/balupton/nowpad.git
cd nowpad
git checkout 0.12
rm -Rf node_modules
npm install
@balupton
balupton / readme.md
Created August 10, 2011 02:31
Installing Python, Easy Install, PIP, VirtualEnv, Mercurial, on Mac OSX

This readme will install python, easy_install, pip, virtualenv, and mercurial on Mac OSX. The only pre-requisite is a Homebrew installation.

  1. Install python, distribute and easy_install
brew install python
  1. Follow the brew instructions for setting up your path
@balupton
balupton / ajaxify-html5-native.js
Created August 15, 2011 06:38
Ajaxify a Website with the HTML5 History API, jQuery and ScrollTo
// https://gist.github.com/1145804
(function(window,undefined){
// Prepare our Variables
var
history = window.history,
$ = window.jQuery,
document = window.document;
// Check to see if the HTML5 History API is enabled for our Browser
@balupton
balupton / options=.sublime-snippet
Created September 2, 2011 00:15
Sublime Snippet which creates a set of options with the sparkle and argument data.
<snippet>
<content><![CDATA[options = \$.extend(${1:true,}{$2},\$this.data('sparkle-${3:options}')||{},options||{});
]]></content>
<tabTrigger>options=</tabTrigger>
<scope>source.js</scope>
<description>options = $.extend(true,{},$this.data('sparkle-options')||{},options||{});</description>
</snippet>
@balupton
balupton / README.md
Last active September 27, 2015 01:38
JQTest: Server-Side jQuery testing with Node.js, Expresso and CoffeeScript. Test faster, test funner.

JQTest

Server-Side jQuery testing with Node.js, Expresso and CoffeeScript. Test faster, test funner.

@balupton
balupton / schedule.md
Last active September 27, 2015 01:38
Tasks up for delegation. Defunct
@balupton
balupton / README.md
Last active September 29, 2018 18:31
Responsive layouts in stylus

Responsive layouts in stylus

Why this way?

  1. There is no span1..15 styles, instead your css defines your layout and your html remains semantic and not polluted with display information. As it should be.

  2. The markup is incredibly easy, you specify the wrappers width, and then each columns width in percentages. Every other grid framework I've found is incredibly complicated with this.

  3. It allows you to have the exact same markup, and completely different styles for different devices, resolutions, stylesheets, whatever. As it should be.

@balupton
balupton / example-output.txt
Created January 2, 2012 02:58
DocPad: Interactive CLI Prototyping
Welcome to DocPad
DocPad GUI started on port {docpadGuiPort}
You're currently {docpadMood} with DocPad. Thanks for letting us know.
Execute your commands here:
> help
Notes: