Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
🏍️
Travelling for next 2 weeks

Benjamin Lupton balupton

🏍️
Travelling for next 2 weeks
View GitHub Profile
@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 / DocPad Nifties.md
Last active October 13, 2015 20:07
DocPad Nifties
@jhs
jhs / rant.md
Last active December 10, 2015 09:18
Rant about Node.js library logging

What I want for library logging

I write Node.js libraries, and I want logging. Why is this so problematic?

Note, I am despairing about how library authors log stuff not how application builders decide on a logging framework.

Hopefully this document can become a spec or feature list for code I will write some day.

The antipattern

@balupton
balupton / README.md
Last active December 23, 2015 12:09
A comparison of animal vs plant products
module.exports = {
plugins: [
// es2015 - based off of v6.3.13
// https://github.com/babel/babel/blob/master/packages/babel-preset-es2015/index.js
[require('babel-plugin-transform-es2015-template-literals'), { loose: true }],
require('babel-plugin-transform-es2015-literals'),
require('babel-plugin-transform-es2015-function-name'),
require('babel-plugin-transform-es2015-arrow-functions'),
require('babel-plugin-transform-es2015-block-scoped-functions'),
[require('babel-plugin-transform-es2015-classes'), { loose: true }],
@balupton
balupton / README.md
Last active January 22, 2016 16:50
DocPad Continuous Deployment
@cowboy
cowboy / very-small-ie-detect.js
Created August 21, 2010 13:26 — forked from padolsey/gist:527683
Very small IE detect (aka type coersion ftw)
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 6) then:
// ie === 0
// If you're in IE (>=6) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@balupton
balupton / README.md
Last active January 14, 2017 03:36
Thoughts on a new CMS

Some thoughts on a new CMS, in different progressions.

@balupton
balupton / README.md
Last active January 14, 2017 03:40
Problems

This gist is used to contain list of issues I've encountered with entities. Luckily, all have been resolved.

@bewest
bewest / README.md
Last active February 28, 2017 01:49
using travis-ci to build using docpad, and publish to github pages

use travis-ci to publish to github

Demo

docpad

The docpad-plugin-ghpages uses the following information to stitch a new repo with contents of ./out directory onto root of your gh-pages branch:

  • git config user.email
  • git config user.name