Skip to content

Instantly share code, notes, and snippets.

@NelsonMinar
NelsonMinar / keybase.md
Created March 20, 2014 00:56
keybase.io verification

Keybase proof

I hereby claim:

  • I am NelsonMinar on github.
  • I am nelson (https://keybase.io/nelson) on keybase.
  • I have a public key whose fingerprint is F383 0921 214E 22B3 5789 C4A9 58B7 73C3 2A05 036F

To claim this, I am signing this object:

@NelsonMinar
NelsonMinar / brew config
Created April 22, 2014 23:25
Homebrew ggobi build problem
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 9c37fb969b2f6c5a998bdfed3de9efdb83aacfc6
HOMEBREW_PREFIX: /usr/homebrew2
HOMEBREW_CELLAR: /usr/homebrew2/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.9.2-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
Clang: 5.1 build 503
@NelsonMinar
NelsonMinar / 01.make
Last active August 29, 2015 14:00
homebrew bug installing mg
gcc -O2 -pipe -g -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -DFKEYS -DREGEX -DXKEYS -I/usr/local/include/clens -Wno-strict-aliasing -c autoexec.c
gcc -O2 -pipe -g -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -DFKEYS -DREGEX -DXKEYS -I/usr/local/include/clens -Wno-strict-aliasing -c basic.c
gcc -O2 -pipe -g -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -DFKEYS -DREGEX -DXKEYS -I/usr/local/include/clens -Wno-strict-aliasing -c bell.c
gcc -O2 -pipe -g -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -DFKEYS -DREGEX -DXKEYS -I/usr/local/include/clens -Wno-strict-aliasing -c buffer.c
gcc -O2 -pipe -g -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -DFKEYS -DREGEX -DXKEYS -I/usr/local/include/clens -Wno-strict-aliasing -c cinfo.c
gcc -O2 -pipe -g -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -DFKEYS -DREGEX -DX
@NelsonMinar
NelsonMinar / brew config
Created April 23, 2014 15:14
unison homebrew dependence on NAME environment variable
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 9b71b75b62f5c9b0acd41bfc1cc0899fa5cfd887
HOMEBREW_PREFIX: /usr/homebrew2
HOMEBREW_CELLAR: /usr/homebrew2/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.9.2-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
Clang: 5.1 build 503
@NelsonMinar
NelsonMinar / patch.txt
Created April 24, 2014 14:21
mg patch for homebrew
diff --git a/Library/Formula/mg.rb b/Library/Formula/mg.rb
index 6f522c6..8e9ec35 100644
--- a/Library/Formula/mg.rb
+++ b/Library/Formula/mg.rb
@@ -11,7 +11,8 @@ class Mg < Formula
# makefile hardcodes include path to clens; since it's a
# nonstandard path, Homebrew's standard include paths won't
# fix this for people with nonstandard prefixes.
- inreplace 'Makefile', '/usr/local', prefix
+ inreplace 'Makefile', '/usr/local', HOMEBREW_PREFIX
@NelsonMinar
NelsonMinar / README.md
Last active August 29, 2015 14:00
Simple D3 modular chart

A very, very simple modular chart based on [Mike Bostock's recommendation](// A very, very simple D3 modular chart based on http://bost.ocks.org/mike/chart/)

Creates a new chart type "histobar" that when insantiated, renders the data as a string in an SVG. Obviously not useful in itself, but the simplest possible reusable chart as a place to start.

@NelsonMinar
NelsonMinar / demo.html
Created May 18, 2014 18:37
Demo of HTML5, dropping a file and processing contents
<!DOCTYPE html>
<html lang="en">
<head> <meta charset="utf-8">
<title>Simple drag and drop demo</title>
<style type="text/css">
html, body { height: 100%; }
body { margin: 0; font-family: Helvetica, Arial, sans; }
#help {
width: 100%; height: 100%;

Gruber: Have you seen this thing where there's this group that wants to turn Markdown into an IETF standard?

Marco: No, w-- let me guess -- Jeff Atwood?

Gruber: I don't even know, you know what, it broke last weekend. I was out of town with Amy and wasn't paying attention, and I've been busy this week on other stuff. I haven't even paid attention to it. I don't know if it's associated with Atwood's crusade or not. And, there's talk from some people -- and the funny thing is, they're doing it on a mailing list that I still host and I haven't participated on in years. And I don't know why I haven't pulled the plug on the damn mailing list, but I still host the markdown-discuss mailing list, and there's people saying that they should just take the name Markdown from me because I've been such a lousy steward of it and whatever. Meanwhile, you know, there's the web pages on my site for Markdown describing the syntax and everything are more popular every single day. It's more popular -- I could actually -- I've t

@NelsonMinar
NelsonMinar / SugarAgent.m
Created September 17, 2014 00:56
SugarScape agent in Swarm, July 1997
// Sugarscape in Swarm. Copyright (C) 1997 Nelson Minar
// This program is distributed without any warranty; without even the
// implied warranty of merchantability or fitness for a particular purpose.
// See file LICENSE for details and terms of copying.
#import "SugarAgent.h"
#import <simtools.h>
#import "ModelSwarm.h"
@implementation SugarAgent
@NelsonMinar
NelsonMinar / checkCsv.py
Created January 10, 2015 17:25
Quickie script to check an OpenAddresses source CSV file for a consistent number of rows
#!/usr/bin/env python3
"""Check a CSV source for consistent number of rows
Usage: checkCsv.py encoding filename"""
import sys
counts = {}
fp = open(sys.argv[2], encoding=sys.argv[1])
for l in fp: