Skip to content

Instantly share code, notes, and snippets.

View macta's full-sized avatar

Tim Mackinnon macta

  • morethan.technology
  • London
  • X @iterex
View GitHub Profile
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Quotes around values are not supported, except in the case of
; the environment= options as shown below.
[Unit]
Description=Supervisor daemon
Documentation=http://supervisord.org
After=network.target
[Service]
ExecStart=/usr/local/bin/supervisord -n -c /etc/supervisor/supervisord.conf
ExecStop=/usr/local/bin/supervisorctl $OPTIONS shutdown
ExecReload=/usr/local/bin/supervisorctl $OPTIONS reload
KillMode=process
@macta
macta / supervisord
Last active May 28, 2018 13:18
init script for supervisord that works on Ubuntu 16. You need to copy this into /etc/init.d. (See comment for more instructions)
#! /bin/bash -e
### BEGIN INIT INFO
# Provides: supervisor
# Required-Start: $remote_fs $network $named
# Required-Stop: $remote_fs $network $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop supervisor
# Description: Start/stop supervisor daemon and its configured
# subprocesses.
@macta
macta / ebola-graph.st
Created October 27, 2014 23:53
Example Roassal Moose script for graphing Ebola data in the playground
tab := RTTabTable new input: (ZnEasy
get: 'https://raw.githubusercontent.com/cmrivers/ebola/master/country_timeseries.csv')
contents usingDelimiter: $,.
tab removeFirstRow.
tab replaceEmptyValuesWith: '0' inColumns: (2 to: 12) asArray.
tab convertColumnsAsInteger: (2 to: 12) asArray.
tab convertColumnAsDateAndTime: 1.
tab replaceZeroWithCumulativeValuesInColumns: (2 to:12) asArray.
data := tab values reversed.
@macta
macta / completion.st
Last active August 29, 2015 14:06 — forked from Uko/completion.st
Example prefs for Pharo. Files should reside in ~/Library/Preferences/pharo/
StartupLoader default executeAtomicItems: {
StartupAction
name: 'Code completion setings'
code: [
NECPreferences
enabled: true;
popupShowAutomatic: true;
useController: NECController;
popupShowWithShortcut: Character space shift ]
runOnce: true
@macta
macta / gist:9363880
Last active August 29, 2015 13:57
tag_generator.rb
=begin
Jekyll tag page generator.
based on: https://github.com/pattex/jekyll-tagging (v0.5.0)
By Arne Eilermann <eilermann@lavabit.com> and Jens Wille <jens.wille@uni-koeln.de>
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
A generator that creates tag pages for jekyll sites.
=begin
CategoryPagination allows Jekyll sites to have index pages for each category, and to break those
category indexes into multiple pages.
This code belongs in the _plugins directory.
The following items need to be true:
* No longer required -> There is a file called "category_index.html" in the _layouts directory