Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
🧙‍♀️
Working on Dorothy, a dotfile ecosystem

Benjamin Lupton balupton

🧙‍♀️
Working on Dorothy, a dotfile ecosystem
View GitHub Profile
@balupton
balupton / README.md
Last active October 1, 2015 14:48
Bevry's Twilio Application using Node.js
@balupton
balupton / README.md
Last active October 2, 2015 03:07
Backbone.js introduction for Mickey

Backbone.js introduction for Mickey

@balupton
balupton / README.md
Last active February 21, 2016 03:41
Failing async test for Mocha
@balupton
balupton / fgp.sh
Created April 30, 2012 20:46
Bash function to fix your github pages when github forgets that they exist. Add to your .bashrc file.
# Fix Github Pages
# Usage: fgp YOUR-GITHUB-PROJECTS-SSH-REPO-URL
function fgp {
git clone $1 fixit
cd fixit
git checkout gh-pages
git push origin :gh-pages
git push origin --all
cd ..
rm -Rf fixit
@balupton
balupton / blog-moving-docpad-forward-a-gui.md
Created June 10, 2012 15:40
Blog: Moving DocPad Forward, the rise of backend-agnostic GUIs

Moving DocPad Forward, the rise of backend-agnostic GUIs

A GUI, or rather a CMS interface for DocPad is the big next step. It was also one of the first proof of concepts I used to ensure DocPad would be able to scale into the web development platform of the future.

Proof of Concept

Back in the first early months of DocPad, I created three plugins:

  • Authenticate: To authenticate you against the project's maintainers to ensure that you have read and write access
  • REST: Provided authenticated users the ability to update documents via HTTP POST requests using JSON
@balupton
balupton / README.md
Last active October 6, 2015 02:48
JavaScript Default Operator Prototyping
@balupton
balupton / docpad-text-plugin-cheerio.coffee
Created June 29, 2012 06:57
DocPad Text Plugin: Different HTML Implementations
# Export Plugin
module.exports = (BasePlugin) ->
# Define Plugin
class TextPlugin extends BasePlugin
# Plugin name
name: 'text'
# Get the text
getText: (opts) ->
# Prepare
@balupton
balupton / .bash_profile
Created August 1, 2012 13:34
Prompt Command with time, user, host, location, git branch, and git status
###
# Colors
export RED="\[\033[0;31m\]"
export RED_BOLD="\[\033[01;31m\]"
export BLUE="\[\033[0;34m\]"
export CYAN='\[\e[0;36m\]'
export PURPLE='\[\e[0;35m\]'
export GREEN="\[\033[0;32m\]"
@balupton
balupton / newsletter.coffee
Created August 26, 2012 13:30
Asking for Newsletter Details (with git config fetching)
# First Run Callback
firstRunCallback: (data,next) ->
# Prepare
consoleInterface = @
commander = @commander
docpad = @docpad
balUtil = require('bal-util')
# Log
@balupton
balupton / README.md
Last active January 21, 2017 00:40
DocPad: Paging Solutions

DocPad: Paging Solutions

  • post.html.eco used for displaying prev and next page links on your current page (static site friendly)
  • posts.html.eco used for displaying a content listing, that is split up onto multiple pages (requires dynamic site)
  • paged plugin used for splitting a document into a different pages, very neat (static site friendly)