Skip to content

Instantly share code, notes, and snippets.

View topfunky's full-sized avatar

Geoffrey Grosenbach topfunky

View GitHub Profile
# As seen at
foreground_color = "white"
background_color = "black"
x = year,
y = revenue,
group = product,
topfunky /
Created August 16, 2021 17:57
Add Mozilla Public License
#!/usr/bin/env sh
# Download the Mozilla Public License 2.0 and commit it to the current repository.
# Author: Geoffrey Grosenbach <>
# Date: August 16, 2021
curl -o LICENSE.txt
git add LICENSE.txt
topfunky /
Last active February 28, 2021 18:53 — forked from kaitlincart/
Technical Editor Project

This is a technical writing and editing project as part of your interview.

This project is designed to take less than 1.5 - 2 hours.

Read the style guide snippet which is a subset of our official engineering style guide and the guide template. Then make improvements to the sample prose so it embodies the principles in the style guide.


  • Create a git repository on GitHub, GitLab, Bitbucket, or any other git hosting service.
  • Download the original file by clicking the "Raw" button.
topfunky /
Created October 10, 2012 23:34
Troubleshooting chef-solo

Troubleshooting chef-solo

Re: PeepCode screencast on Meet Chef

  • Is the VM running? Try vagrant up
  • Can you connect to the VM? Try vagrant ssh
  • Did chef-solo -j /etc/chef/node.json run without error?
  • Did chef-solo install the nginx package? You should see Run List is [recipe[nginx]]
  • Is Nginx running on the VM? Try ps aux | grep nginx
  • Does the webserver respond on the VM? Run curl -I http://localhost from inside the VM. You should see Server: nginx in the output.
topfunky / duplicate-finder-window.applescript
Created August 24, 2012 18:17
Make a new Finder window open to the same directory as the current one.
Duplicate current Finder window
Author: Barry Els
Version: 1.1
tell application "Finder"
set this_folder to (the target of the front window) as alias
topfunky /
Created August 2, 2012 18:27
Express 3.0 Changes

Changes in Express 3.0 Templates

Related: PeepCode Full Stack Node.js screencast (an included code sample works with Express 3.0).

There are several syntax changes in Express 3.0. They do require modifications to your code, but they aren't too complicated.

The biggest change is that Express templates now use Django style inheritance rather than ERB/Rails style automatic layouts.


topfunky / instanceof-example.js
Created March 22, 2012 19:50
example of using instanceof
// NOTE: `app` parameter is an instance of Express.js.
module.exports = function(app) {
var socketIO;
socketIO = require('').listen(app);
socketIO.sockets.on('connection', function(socket) {
console.log(socket instanceof socket.constructor);
vows = require 'vows'
assert = require 'assert'
class Board
class Tour
constructor: ->
@board = new Board
suite = vows.describe('KnightsTour')
topfunky / Cakefile
Created February 11, 2012 21:53
Run tasks sequentially in a Cakefile
task 'sample_task', sample_task = (callback) ->
doSomethingAndRunCallbackAfter callback
task 'setup', 'All: Import all data and run webserver', ->
tasks = [install, pre_populate, populate_couch, graph_sync, server]
runSequentially = (currentTask, otherTasks...) ->
currentTask ->
if otherTasks.length
runSequentially otherTasks...
runSequentially tasks...
topfunky /
Created August 31, 2011 19:13
A custom Batman.js filter
# Transform an integer number of seconds as hours and minutes: 1:45
# Put in filters/ and do @require('filters', 'duration')
Batman.Filters.formatSecondsAsTime = (value) ->
seconds = parseInt value, 10
return '' unless seconds
hours = parseInt seconds / 60 / 60, 10
minutes = parseInt (seconds / 60) % 60, 10
hours = '' unless hours > 0
minutes = '0' + minutes if minutes < 10