-
A Jinja macro for generating an html select box with US states
More on Jinja macros {% macro states_select(name, value=”, class=”, id=”) -%} {% set states = [“AL”, “AK”, “AZ”, “AR”, “CA”, “CO”, “CT”, “DE”, “FL”, “GA”, “HI”, “ID”, “IL”, “IN”, “IA”, “KS”, “KY”, “LA”, “ME”, “MD”, “MA”, “MI”, “MN”, “MS”, “MO”, “MT”, “NE”, “NV”, “NH”, “NJ”, “NM”, “NY”, “NC”, “ND”, “OH”, “OK”, “OR”, “PA”, “RI”, “SC”,…
-
Capitalizing on the Value of the Elderly in Modern Society
As modern societies develop, become richer, and life expectancies increase, the ratio between the elderly, non-working population and younger, industrious population shifts towards unsustainability. In the United States in 2010, for every 100 working-age adults there are 22 non-working elderly. By 2030 there will be 37 non-working for every 100 working age adults. (from census)…
-
Lawrence Lessig’s TED Talk on Reclaiming the Republic
Lessig talks about how the people have lost control of our government to those who have money. He tells stories of politicians and everyone connected to the political and legislative process evolving their thinking to appease their financiers. Deregulation is politically counter-productive because those involved get steady cash from lobbyists to manipulate those regulations. Total reform is…
-
Beauty Can Make the World Safer
It’s amazing how appearances affect our behavior. Edi Rama, an artist and the former mayor of the capital of Albania gave an inspiring TED talk about transforming his city by adding color to old buildings and improving public spaces. Streets that used to be crime ridden became safer because they looked nicer. People are less…
-
Arguments Against Owning a Home: Specialization of Labor
I recently read this article on TechCrunch by James Altucher entitled “Why Entrepreneurs Should NOT Buy Homes“. In discussing the topic with some friends, I was turned on to this article in the Wall Street Journal by economist Robert Bridges showing statistically why home ownership is almost always a poor investment. The idea rings true to…
-
A JavaScript Sigmoid Function
Here’s a simple sigmoid function showing a logistic curve written in javascript function sigmoid(t) { return 1/(1+Math.pow(Math.E, -t)); }
-
How-to Set Up Ubuntu w/ MongoDB Replica Sets on Amazon EC2
This tutorial is intended for beginners who aren’t familiar with EC2 yet, but are generally familiar with mongoDB. EC2 is actually pretty easy, but a lot of the basic info you need to get started is interspersed across numerous websites and articles. This post hopefully puts all the necessary details in one place. The first…
-
Running cherrypy on multiple ports (example)
As a continuation of my previous post on how to run cherrypy as an SSL server as HTTPS (port 443), this tutorial show how to run a single cherrypy instance on multiple ports for both HTTP (port 80) and HTTPS (port 443) We need to do a few things differently than in most examples out…
-
Using SSL HTTPS with cherrypy 3.2.0 Example
It took me more time than it should have to piece together the right bits of current information for using SSL with cherrypy. Here’s a fully working example of cherrypy 3.2.0 serving up HTTPS requests. Quick notes – if you haven’t tried cherrypy, do it. It’s awesome in its simplicity. Also, I got my SSL…
-
Inspiring Civic Hacking
Mick Ebeling recently gave a TED talk about the homemade eye-tracking device he and a bunch of hackers made to allow a paralyzed man to communicate, stephen hawking style. They did this with an off-the-shelf PS3 camera and some open source software for $50. That’s what I call a righteous hack. Most importantly it has…