Skip to content

Instantly share code, notes, and snippets.

jwalton /
Last active December 20, 2015 13:38
Generate a platform-specific tarball name
# Print usage instructions.
printUsage() {
cat <<END
usage: `basename $0` [-hv] [-s version] [-p prefix]
prefix - The filename prefix to use in generating the tarball name.
version - The version number to use in generating the tarball name.
jwalton /
Created September 16, 2013 01:55
Demonstration of mongoose streaming + longjohn causing sadness

To reproduce:

  • Copy the files below
  • npm install
  • ./node_modules/.bin/coffee

Set "repoProblem" to true to make the problem happen, and to false to make the app run WAY faster and not run out of memory. :)

jwalton /
Last active December 5, 2016 08:12 — forked from chelsea/


Dashing widget to display a random cute picture from

The display of the widget is heavily based on the Image widget, however it does not prepend the src with 'assets' which allows for external images.


You can set a placeholder image in the event that reddit is down, or otherwise unresponse. This is set at the top of random_aww.rb as follows:

jwalton / OC Transpo for
Last active March 26, 2019 19:24
OC Transo widget for Dashing

Fetches times for the next buses at a given OC Transpo stop.

Add the following to your gemspec:

gem 'octranspo_fetch', '>= 0.0.4'

Screen Shot

Then configure the constants at the top of oc_transpo.rb.

jwalton / Dashing
Last active October 10, 2019 04:47
EC2 CloudWatch stats for Dashing

Get EC2 CloudWatch stats and graph them in Dashing.

jwalton /
Last active March 27, 2020 10:28 — forked from james/
Pingdom widget for Dashing


Simple Dashing widget (and associated job) to display Pingdom checks.



Add it to dashing's gemfile:

A Dashing widget which shows an image.

To use, in your dashboard.erb file:

<li data-row="1" data-col="1" data-sizex="3" data-sizey="2">
  <div data-id="picture" data-view="BigImage" data-image=""
jwalton / useWhyRender.tsx
Created June 18, 2020 16:00
A react hook to figure out why a component is rendering
/* tslint:disable:no-console */
import ld from 'lodash';
import React from 'react';
* Use this hook to figure out why a React component is re-rendering.
* It will log if any properties in `props` have changed. You should
* also pass any state variables into `props` as well.
jwalton / prefixFormat.ts
Created June 24, 2020 20:23
Winston Formatters
import * as path from 'path';
export interface PrefixFormatOptions {
basepath?: string;
* This is a debug format, used to prefix the message with tags and filenames.
* This copies values to `message`, and strips values out of the `info` so
jwalton / Github Milestone Dashing
Last active July 30, 2020 23:17
Dashing Widget to Display Next Git Milestone

This will show your next GitHub milestone as a Dashing widget. Built on top of the Text widget.

To use:

  • Add the following to your gemfile:

  •   gem 'rest-client'
  • Replace the git_token, git_owner, and git_project in git-milestone.rb as appropriate.