Skip to content

Instantly share code, notes, and snippets.

@ttscoff
ttscoff / barchart.rb
Last active January 2, 2022 10:40
Command line bar chart from JSON data (for GeekTool, et al)
#!/usr/bin/env ruby
# encoding: utf-8
# Brett Terpstra 2013, WTF license <http://www.wtfpl.net/txt/copying/>
# Outputs a vertical bar chart from date-based JSON data
# Requires the JSON rubygem: `[sudo] gem install json`
require 'date'
require 'open-uri'
require 'rubygems'
require 'json'
@jwalton
jwalton / FlyingWidgets.md
Last active October 13, 2022 07:03
CSS3 Transitions for Dashing Dashboards

Flying Widgets adds CSS3 transitions to your dashboard, allowing you to cycle through multiple widget sets on a single TV without page reloads, using stylish CSS3 transitions. You can even still re-order your widgets and save their locations!

Note that sinatra-cyclist is a potential alternative if the machine you use to display your dashboards is lacking in graphics horsepower.

To use, put this file in assets/javascripts/cycleDashboard.coffee. Then find this line in application.coffee:

    $('.gridster ul:first').gridster
@caged
caged / d3-server.js
Last active October 17, 2023 04:05
Directly render and serve d3 visualizations from a nodejs server.
// Start `node d3-server.js`
// Then visit http://localhost:1337/
//
var d3 = require('d3'),
http = require('http')
http.createServer(function (req, res) {
// Chrome automatically sends a requests for favicons
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't
// fixed or this is a regression.
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@croaky
croaky / .travis.yml
Created July 31, 2013 18:25
This is our current Travis configuration for our standard Rails 4 + Ruby 2 projects that have Capybara Webkit test suites and Postgres databases. It relies on the bundle_cache.rb and bundle_install.sh files from http://randomerrata.com/post/45827813818/travis-s3 to cache gem bundles for much faster test suite setup time.
---
rvm:
- 2.0.0
before_install:
- "echo 'gem: --no-document' > ~/.gemrc"
- "echo '--colour' > ~/.rspec"
- gem install fog
- "./script/travis/bundle_install.sh"
- export DISPLAY=:99.0
@robotmay
robotmay / dashing-heroku.md
Last active November 29, 2016 11:59
Heroku jobs for Dashing. Returns the number of active dynos for each process type (including custom processes). Set your Heroku keys as environment variables.

Add the following to your Gemfile:

gem 'heroku-api'

Put heroku.rb in your jobs folder and add the contents of heroku.html into your layout.

@parthibanloganathan
parthibanloganathan / README.md
Last active July 22, 2016 17:48
Subway Info widget for Dashing

Subway Info

##Preview

Screenshot 1: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/mta1.png Screenshot 2: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/mta2.png

Description

Subway Info is a Dashing widget which displays information on trains in New York City. Information includes train line, direction, station and arrival time. You can customize it to include any combination of lines and stations. This may also be used in other cities as well if you have the appropriate GTFS files.

@toddq
toddq / README.md
Last active October 13, 2022 07:03 — forked from iainjmitchell/README.md

##Description Simple Dashing widget (and associated job) to display RSS feeds. Based on Iaian Mitchell's News widget.

##Screenshot

##Dependencies nokogiri

htmlentities

@assimovt
assimovt / README.md
Last active June 8, 2018 22:12
Adds Newrelic RPMs metrics to your dashboard.

Setup

Add the following gems to your Gemfile:

gem 'activeresource'
gem 'newrelic_api'

Update your bundle:

So yesterday brought the sad news that Google Reader is being killed off. C’est la vie it seems, given it was a Google product. In my search for an alternative I rediscovered Fever and decided to see if I could run it up for free on Heroku. Onwards...

Personally I think the news about Reeder is quite sad, as I would quite happily have paid for it as a service. In fact I like RSS so much that I actually shelled out the $30 for Fever when it first came out years ago (I was also pretty massive Shaun Inman fanboy if I’m being honest).

I ended up setting Fever aside because screw having to manage self-hosting for PHP and MySQL, right?

If you’re new to Fever I recommend going and checking it out, but also reading the post in response to the Google Reader announcement by Fevers author, Shaun, for a good list of what Fever is and isn’t.

Enough jibba-jabba!