Skip to content

Instantly share code, notes, and snippets.

View gregology's full-sized avatar

Gregory Clarke gregology

View GitHub Profile
@gregology
gregology / dashboard
Last active December 8, 2020 14:19
Service script for dashing. Update DASHING_DIR variable, add this file to /etc/init.d/ , chmod to 755, and let update rc.d with $ sudo update-rc.d dashboard defaults This scripts stops the dashing service with "killall thin" which will kill all thin services running on your server.
#!/bin/bash
# Dashing service
# Add this file to /etc/init.d/
# $ sudo cp dashboard /etc/init.d/
# Update variables DASHING_DIR, GEM_HOME, & PATH to suit your installation
# $ sudo nano /etc/init.d/dashboard
# Make executable
# $ sudo chmod 755 /etc/init.d/dashboard
# Update rc.d
# $ sudo update-rc.d dashboard defaults
@gregology
gregology / README.md
Last active September 5, 2019 14:05
Load averages of *nix server running dashing.

Setup

Put the loadavg1min.rb to jobs/loadavg1min.rb.

Add the code from loadavg1min.erb to the desired dashboard.

Preview

@SeanJA
SeanJA / README.md
Last active October 21, 2016 07:40
Google Pageviews

Set Up

You will need Sija's version of the garb gem, so add this line to your Gemfile (you will need git installed for this):

gem 'garb', :git => 'git://github.com/Sija/garb.git'

Then run the gem bundler: bundle install

Set your google username

@tomconte
tomconte / iftt_blink1.py
Created January 9, 2013 19:56
This is a very basic Python script that will let you poll ThingM's IFTT event service. You need to change the "IFTT key" in the URL, and use that same key in your IFTT blink(1) channel. I think any 16-character string will work but you should generate your own unique value, possibly including the blink(1) serial number (blink1-tool --list). The …
#!/usr/bin/python
import urllib2
import json
import time
import calendar
import subprocess
url = 'http://api.thingm.com/blink1/events/01234567DEADC0DE'
@ttscoff
ttscoff / rtftomarkdown.rb
Created October 9, 2012 21:05
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).