⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
require 'growl' | |
module Jekyll | |
class GrowlGenerator < Generator | |
safe false | |
def generate(site) | |
Growl.notify 'Building...', :title => 'Jekyll' | |
end | |
end |
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
#! /usr/bin/python | |
from sys import argv | |
from os.path import exists | |
from os import makedirs | |
from os import symlink | |
from os import system | |
import getopt | |
# |
describe('catalogyBody', function() { | |
var chai = require('chai'); | |
var path = require('path'); | |
var env = require(path.join(testDir, 'lib', 'environment')); | |
var requirejs = env.requirejs(staticDir); | |
var sinon = requirejs('js/lib/sinon'); | |
var fs = require('fs'); | |
var server; | |
var router; |
Dashing widget to display weather from forecast.io.
##Usage
To use this widget, copy forecast.coffee
, forecast.html
, and forecast.scss
into the /widgets/forecast
directory. Put the forecast.rb
file in your /jobs
folder.
To include the widget in a dashboard, add the following to your dashboard layout file:
I wanted to set up one of my Raspberry Pi's as a data dashboard, pushing sensor data to a web interface that's easy to digest. I decided to use Shopify's Dashing framework. Dashing is based on Sinatra, and is pretty lightweight.
Dashing does require Ruby 1.9.3 to run. In addition, it makes use of the execjs
gem, which needs to have a working Javascript interpreter available. Originally, I tried to get therubyracer working, but decided to switch over to Node.js when I ran into roadblocks compiling V8.
One warning: The RPi is a very slow system compared with modern multi-core x86-style systems. It's pretty robust, but compiling all this complex software taxes the system quite a bit. Expect that it's going to take at least half a day to get everything going.
A Dashing widget for displaying the number of visitors to your website over a specified timeframe, as reported by Google Analytics
A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.
A Dashing widget that checks whether a server is responding to either an http or ping request using smaller squares to represent its status.
This is based off of the Server Status widget that willjohnson developed but modified to work across multiple squares rather than be one square with a list.
The widget updates the appropriate squares color upon determining its status. Statuses are as follows: