Skip to content

Instantly share code, notes, and snippets.

@Telmo
Telmo / supervisord-example.conf
Last active August 29, 2015 14:25 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@Telmo
Telmo / supervisord-example.conf
Last active August 29, 2015 14:25 — forked from didip/supervisord-example.conf
Example for supervisord conf file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@Telmo
Telmo / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am Telmo on github.
  • I am romode (https://keybase.io/romode) on keybase.
  • I have a public key whose fingerprint is E87E 9932 CCB4 DC00 C595 46EB 9028 18E5 B126 ACBA

To claim this, I am signing this object:

heat_template_version: 2013-05-23
description: >
A Heat template to add CoreOS instances to an existing network and configure them via cloud-init/cloud-config
parameters:
network_id:
type: string
label: Neutron network ID
description: ID of existing Neutron network to use
default: dd6de1d2-735e-4b94-963b-b79aae7bcf1a
image_id:
God.watch do |w|
w.uid = "git"
w.gid = "git"
w.name = "camo"
w.pid_file = "/data/camo/tmp/camo.pid"
w.interval = 30.seconds
w.env = {
"PORT" => '8080',
"CAMO_KEY" => '0x24FEEDFACEDEADBEEFCAFE'
upstream docker-registry {
server localhost:5000;
}
server {
# disabled until docker supports selfsigned certs
# listen 443;
server_name my.own.server.com;
access_log /var/log/nginx/docker-registry.access.log main;
error_log /var/log/nginx/docker-registry.error.log error;

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

Open3.pipeline_r(
%W[xmllint --xinclude --xmlout #{spine_file}],
# In order to clean up extraneous namespace declarations we need a second
# xmllint process
%W[xmllint --format --nsclean --xmlout -]) do |output, wait_thr|
open(codex_file, 'w') do |f|
IO.copy_stream(output, f)
end
end