Skip to content

Instantly share code, notes, and snippets.

View altamic's full-sized avatar

Michelangelo Altamore altamic

View GitHub Profile

Human societies are problem solving organizations, which supply the necessities along with entertainment, as well as training to ensure continuation. The over-arching Sociopolitical systems require energy for their maintenance. If left without proper tending, they fall apart like a garden without attention. Increasing complexity carries with it increased cost per capita. Simple monarchies need much less maintenance than democracies, as voices are heard and justice grinds slowly. Investment in sociopolitical complexity often reaches a point of declining marginal returns, as time passes, interest wanes, justice disappoints. When debt saturation occurs, like today, the cost of maintenance and decline can be overwhelming. The complex system becomes vulnerable to collapse after great stresses and what Tainter calls perturbations, better thought of as disruptions or disturbances.

Stress and perturbation are a constant feature of any complex society, always occurring somewhere in its territory. The developed operat

module Bitcoin
module Base58
##
# TODO: I need to study: RFC 2045, RFC 4648.
#
B58_1, B58_9 = ?1, ?9 # (1..9).count => 9
B58_A, B58_H = ?A, ?H # (?A..?H).count => 8
B58_J, B58_N = ?J, ?N # (?J..?N).count => 5
B58_P, B58_Z = ?P, ?Z # (?P..?Z).count => 11
@altamic
altamic / bitcoin.rb
Created November 26, 2010 18:08
bitcoin build with homebrew (still fails)
require 'formula'
class Bitcoin < Formula
version '0.3.17'
url "http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-#{version}/bitcoin-#{version}-linux.tar.gz"
sha1 'c81637bc78d697e212846cf8b68c281eb8edfaec'
head 'https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk', :using => :svn
homepage 'http://www.bitcoin.org'
@altamic
altamic / readme.ext
Created November 5, 2010 23:41
how to make extension libraries for Ruby
.\" README.EXT - -*- Text -*- created at: Mon Aug 7 16:45:54 JST 1995
This document explains how to make extension libraries for Ruby.
1. Basic knowledge
In C, variables have types and data do not have types. In contrast,
Ruby variables do not have a static type, and data themselves have
types, so data will need to be converted between the languages.
@altamic
altamic / strftime.txt
Created September 17, 2010 12:29
STRFTIME
STRFTIME(3) BSD Library Functions Manual STRFTIME(3)
NAME
strftime, strftime_l -- format date and time
The conversion specifications are copied to the buffer after expansion as
follows:
%A is replaced by national representation of the full weekday name.
function compush {
MSG="update"
if [ "$1" = "-m" ] ; then
MSG="$2"
shift
shift
fi
FLAGS=""
if [ "$#" = 0 ] ; then
$ GST_DEBUG=*:2 gst-launch videotestsrc ! glimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Caught SIGSEGV accessing address 0x79
#0 0x00007fff82b6adce in select$DARWIN_EXTSN ()
#1 0x0000000100197e92 in g_poll ()
#2 0x0000000100187bed in g_main_context_iterate ()
#3 0x0000000100187fb5 in g_main_loop_run ()
#4 0x0000000100019700 in gst_bus_poll ()
#5 0x0000000100001acb in dyld_stub_g_str_has_prefix ()
require 'formula'
class GstPluginsGl < Formula
url 'http://www.gstreamer.net/src/gst-plugins-gl/gst-plugins-gl-0.10.1.tar.gz'
homepage 'http://www.gstreamer.net/src/gst-plugins-gl/'
md5 '81c098243702c0f22db1527d0077d7bf'
def install
system "./configure", "--prefix=#{prefix}"
system "make install"
# Simple BASH function that shortens
# a very long path for display by removing
# the left most parts and replacing them
# with a leading ...
#
# the first argument is the path
#
# the second argument is the maximum allowed
# length including the '/'s and ...
#
require 'observer'
class Iraci < Struct.new(:name, :birth_date)
include Observable
def birth!
self[:birth_date] = Time.now.strftime('%d %B')
changed
notify_observers(name, birth_date)
end
end