Skip to content

Instantly share code, notes, and snippets.

@earl
earl / 1-rebol.reb
Last active August 29, 2015 14:07 — forked from hostilefork/1-rebol.reb
Rebol [
Title: "Rebol Dialected Experiment to represent CMake files"
;; See:
;; http://curecode.org/rebol3/ticket.rsp?id=2177
;; http://browsenpm.org/package.json#dependencies
Needs: [
1.0
cmake 2.8
]
REBOL [
title: "Example simple TCP client<->server data transfer"
author: "Richard Smolak"
]
; Length in bytes of test data we transfer.
data-len: 100'000
s: open tcp://:8080
s/awake: func [event /local con] [
@earl
earl / ideal ops.md
Created June 6, 2012 12:24 — forked from bhenerey/ideal ops.md
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@earl
earl / actions.js
Created June 8, 2010 12:17 — forked from hns/gist:429711
var {Response, skinResponse} = require('ringo/webapp/response');
var {ContinuationSession} = require('ringo/webapp/continuation');
var log = require('ringo/logging').getLogger(module.id);
// the main action is invoked for http://localhost:8080/
exports.index = function(req) {
return skinResponse('./skins/welcome.txt', {title: 'Demo'});
};
/*
** config entry for upload routing:
** [ '/upload', './actions', 'upload', {methods: ['GET', 'POST']} ],
** alternatively:
** [ '/upload', './actions', 'upload_get', {methods: ['GET']} ],
** [ '/upload', './actions', 'upload_post', {methods: ['POST']} ],
*/
var {Response, skinResponse} = require('ringo/webapp/response');
var {ContinuationSession} = require('ringo/webapp/continuation');
var {defer} = require("ringo/promise");
var {setTimeout} = require("ringo/scheduler");
exports.delayed = function(request) {
var response = defer();
setTimeout(function() {
response.resolve({
status: 200, headers: {}, body: ["Delayed"]
});
}, 1000);