Skip to content

Instantly share code, notes, and snippets.

@EricFromCanada
EricFromCanada / tigerbrew-node-config.command
Last active October 24, 2021 23:17
Configure an OS X system as a Tigerbrew test node.
#!/bin/bash
# ====================================================================
# tigerbrew-node-config.command
#
# Configure an OS X system as a Tigerbrew test node.
# Assumes that Developer Tools & Remote Desktop Client are installed.
# Only tested on 10.4 and 10.5 so far.
#
# @EricFromCanada
@EricFromCanada
EricFromCanada / gist:9941779
Created April 2, 2014 19:50
Extends and simplifies the built-in XML type
// THE XML_TREE TRAIT
define xml_tree_trait => trait {
provide attr() => {
local(out = map)
with attr in .attributes
do #out->insert(#attr->name = #attr->value)
return #out
}
@EricFromCanada
EricFromCanada / pi_generator.lasso
Created November 6, 2013 01:14
Using Lasso to generate π to 800 places, including the decimal point. Based off Dik T. Winter's C implementation of Beeler et al. 1972, Item 120 (http://crypto.stanford.edu/pbc/notes/pi/code.html).
#!/usr/bin/lasso9
define generatePi => {
yield currentCapture
local(r = array(), i, k, b, d, c = 0, x)
with i in generateSeries(1, 2800)
do {
#r->insert(2000)
}