Skip to content

Instantly share code, notes, and snippets.

View canadaduane's full-sized avatar

Duane Johnson canadaduane

View GitHub Profile
@canadaduane
canadaduane / gist:5086019
Last active December 14, 2015 12:28
Response to Vlad's post on Patents
A succinct explanation of the history, problem, and potential solution.
Here is a chart I made from the USPTO data to see if the story you tell
matches the data. I think it clearly does:
http://db.tt/CNanl3IY
Also, note how patent volume is essentially "pre-internet" and "post-
internet" (circa 1990).
@canadaduane
canadaduane / bbwifi.txt
Created May 19, 2013 18:41
BeagleBone WiFi can be manually enabled with "test-connman connect" but autoconnect fails
# Adventures In Wireless BeagleBone Black:
# What prevents my Edimax WiFi USB dongle from autoconnecting to my home WiFi network, "Catalina Island Network"?
# NOTE: If you're here to glean info for your own setup, note that I've installed the
# following two connman auxiliary packages which give the tools and test scripts in
# /usr/lib/connman/test that I use below
# $ opkg install connman-tools connman-tests
#
# Also, I've disabled power save mode for the WiFi so that the BBB can act as a server:
# $ cat > /etc/udev/rules.d/wifi_power_save.rules <<-EOF
@canadaduane
canadaduane / gist:5694076
Last active December 18, 2015 00:08
The Theoretical Limit of Copyright Compromise

TL;DR The maximum number of copies that society should pay for a particular title is the number of concurrent readers, watchers, or listeners of that title--this is the theoretical limit of copyright compromise. This may be possible within current copyright law, as long as co-operation can be organized.

We have two opposing forces in the modern copyright battleground. On the one side is copyright maximalists--usually the middlemen--who want to maximize profits and minimize (or at least have little concern for) public good. On the other is copyright minimalists (i.e. the public) who are now part of the distribution system called the internet. Maximalists want to maintain artificial scarcity while minimalists (most people) want to (a) share what they will with friends and (b) not feel guilty for exploiting authors.

According to my understanding of copyright law and the first-sale doctrine, content producers and publishers presently make more money than they theoretically should. They rely on many copies of

@canadaduane
canadaduane / ledtest.ino
Created June 5, 2013 02:35
LED test for Arduino Game Class
const int pinLED = 13;
const int pinRed = 3;
const int pinGreen = 4;
const int pinBlue = 5;
void setup() {
pinMode(pinLED, OUTPUT);
pinMode(pinRed, OUTPUT);
@canadaduane
canadaduane / simon.ino
Last active December 18, 2015 08:29
The game of "Simon" (memorizing light colors) on a Teensy 3.0 (Arduino-compatible).
const int pinLED = 13;
const int pinLightL = 3;
const int pinLightM = 4;
const int pinLightR = 5;
const int pinButtonL = 22;
const int pinButtonM = 21;
const int pinButtonR = 20;
@canadaduane
canadaduane / gist:5767915
Created June 12, 2013 18:40
Fixup for OS X sendmail
I couldn't use sendmail on OS X Mountain Lion:
sendmail: fatal: chdir /Library/Server/Mail/Data/spool: No such file or directory
So, this fixed it:
sudo mkdir -p /Library/Server/Mail/Data/spool
sudo gzip /usr/share/man/man1/{postalias.1,postcat.1,postconf.1,postdrop.1,postfix.1,postkick.1,postlock.1,postlog.1,postmap.1,postmulti.1,postqueue.1,postsuper.1,sendmail.1}
sudo gzip /usr/share/man/man5/{access.5,aliases.5,bounce.5,canonical.5,cidr_table.5,generic.5,header_checks.5,ldap_table.5,master.5,mysql_table.5,nisplus_table.5,pcre_table.5,pgsql_table.5,postconf.5,postfix-wrapper.5,regexp_table.5,relocated.5,tcp_table.5,transport.5,virtual.5}
sudo gzip /usr/share/man/man8/{anvil.8,bounce.8,cleanup.8,discard.8,error.8,flush.8,local.8,master.8,oqmgr.8,pickup.8,pipe.8,proxymap.8,qmgr.8,qmqpd.8,scache.8,showq.8,smtp.8,smtpd.8,spawn.8,tlsmgr.8,trivial-rewrite.8,verify.8,virtual.8}
sudo /usr/sbin/postfix set-permissions
sudo chmod 700 /Library/Server/Ma
@canadaduane
canadaduane / correa.md
Created June 24, 2013 22:19
Fascinating story about Ecuador's current president, Rafael Correa

Correa's "attack" on the newspaper El Universo tends to downplay how the "attack" was a defamation lawsuit fought through the courts. Correa was abducted and placed under siege in a hospital during an attempted police coup - which had been substantially instigated by the press - in 2010. He was rescued by a loyal faction of the police, during which a firefight in the hospital occurred. While there was still the general air of armed insurrection by the country's police force, the newspaper published an editorial reporting that the president had committed war crimes. Correa took the newspaper to court, and won. He then pardoned the defendants of all penalties that had been imposed by the courts.

http://justice4assange.com/extraditing-assange.html#ECUADOR

// Define pins used by potentiometer knobs
#define paddle_l 16
#define paddle_r 15
// Define pins used by buttons
#define button_l 22
#define button_r 21
#define button_m 20
// Define pins used by SPI to communicate with LCD display
@canadaduane
canadaduane / rackspace.yml
Created July 20, 2013 23:57
Ansible Rackspace Setup
---
- name: crunch
hosts: all
user: root
vars:
upcs_version: 436eef9e32e02dd574a1d10d277362fe32d952b0 # or 'master' for latest
hosts_size: "{{ groups['crunch'] | length }}"
archive_org_page_total: 680
archive_org_page_first: "{{ archive_org_page_total / int(hosts_size) * int(server_idx) }}"
@canadaduane
canadaduane / Dockerfile
Last active December 20, 2015 06:19
Is something misconfigured?
# Dockerfile for ruby 1.9.3
FROM ubuntu-12.10
MAINTAINER Duane Johnson
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y language-pack-en