Skip to content

Instantly share code, notes, and snippets.

#The Uses of Poverty: The Poor Pay All.

Herbert J. Gans.

Social Policy July/August 1971: pp. 20-24.

Some twenty years ago Robert K. Merton applied the notion of functional analysis to explain the continuing though maligned existence of the urban political machine: if it continued to exist, perhaps it fulfilled latent - unintended or unrecognized - positive functions. Clearly it did. Merton pointed out how the political machine provided central authority to get things done when a decentralized local government could not act, humanized the services of the impersonal bureaucracy for fearful citizens, offered concrete help (rather than abstract law or justice) to the poor, and otherwise performed services needed or demanded by many people but considered unconventional or even illegal by formal public agencies.

Today, poverty is more maligned than the political machine ever was; yet it, too, is a persistent social phenomenon. Consequently, there may be some merit in applying functional analysis to poverty, i

@andrewgilmartin
andrewgilmartin / gist:26fd5b2ce02a3219c96c
Last active August 29, 2015 14:08
Bookmarklet to cleanup Kindle Your Highlights page
javascript:(function(){
var O = $('<div class="books"/>');
var S;
var xs = $("#allHighlightedBooks").children();
for ( var i = 0; i < xs.length; i++ ) {
var x = $(xs[i]);
var c = x.attr("class");
if ( c.indexOf("bookMain") != -1 ) {
t = $('.title',x).text();
a = $('.author',x).text();
@andrewgilmartin
andrewgilmartin / illiterate.pl
Last active October 8, 2019 16:48
Simpleminded Java + Javadoc to HTML Converter
#!/usr/bin/perl -w
use strict;
use XML::Writer;
my $state = 0;
my $h = new XML::Writer();
$h->startTag("html");
$h->startTag("head");
@andrewgilmartin
andrewgilmartin / gist:be3b01770245028633f4
Last active August 12, 2018 22:50
The Observer Pattern
/**
* The Observer pattern is used to create a relationship between two objects.
* The relationship is usually unidirectional with the observer waiting for
* notices from the observed. The relationships is a loose one as the observed
* only needs to know of the interest of the observer and the observer only
* needs to know of the set of and ordering of notice the observed will send. A
* downside of this looseness is that all notices pass through a single observer
* method for further dispatching.
*/
package com.andrewgilmartin.common.observation;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Horizon Chart</title>
<script type="text/javascript">
function HorizonChart( canvas, barWidth, barColors ) {
this.canvas = canvas;
this.canvasHeight = +canvas.attributes.height.value;
@andrewgilmartin
andrewgilmartin / print-text-two-column.sh
Created April 12, 2012 15:39
Simple script to prepare a two column layout PDF from a file of text
#!/bin/bash
# usage: print-text-two-column.sh file1 file2 ...
for f in "$@"
do
o="$(mktemp -q /tmp/$(basename $0).XXXXXX).pdf"
enscript \
--header='$n||$%/$=' \
--word-wrap \
@andrewgilmartin
andrewgilmartin / gist:2064871
Created March 17, 2012 20:11
Parser for the common ISO 8061 date and timestamps.
/**
* Returns the timestamp parsed from the given ISO 8061 UTC string. Note
* that all of the following timestamp forms are supported: {@code
*
* YYYY := YYYY-01-01T00:00:00.0Z
* YYYY-MM := YYYY-MM-01T00:00:00.0Z
* YYYY-MM-DD := YYYY-MM-DDT00:00:00.0Z
* YYYY-MM-DD'T'HH := YYYY-MM-DDTHH:00:00.0Z
* YYYY-MM-DD'T'HH:MM := YYYY-MM-DDTHH:MM:00.0Z
A couple of years ago I received a review copy of Bryant Terry's cookbook Vegan Soul Kitchen and a number of the recipes became part of my regular repertoire.
I've lost count of the number of times that my daughter and I have made the potato salad for parties and picnics and it's always extremely popular. I was very excited to receive a copy of his new book The Inspired Vegan. The first thing I tried from it was this roasted winter vegetable jambalaya.
Although this recipe is really simple and doesn't take a lot of tending, it does take a fair amount of time. It's a great mid-week dinner if you work at home, because you don't have to pay a lot of attention to it, but otherwise, it's probably best cooked on a weekend.
I also missed the direction that said the brown rice should be soaked over night, so mine got soaked for about an hour. The rice was a bit toothy, but that was okay.
Combine the vegetables straight into the roasting pan, rather than a bowl as it says in the recipe. Really, who needs an extra
# This GIST has no other purpose than to demostrate that single-line perl scripts rock.
# This one extracts the time-stamp and duration from each matching record.
perl -ne 'if ( /(\d\d):(\d\d):(\d\d).*duration:\s*([\d,]+)ms/ ) { $time = ($1*60+$2)*60+$3; ( $duration = $4 ) =~ s/[^\d]//; printf( "%8d %5d\n", $time, $duration ); }'
( function( substitution_cipher_grid ) {
var substitution_cipher={};
var rows = substitution_cipher_grid.split(".");
for ( var r = 0; r < rows.length; r++ ) {
var cells = rows[r].strip().split( /\s+/ );
for ( var c = 0; c < cells.length; c++ ) {
substitution_cipher[cells[c]]=c+1
}
}
var domain = window.location.host.split('.').reverse().splice(0,2).reverse().join('.');