Skip to content

Instantly share code, notes, and snippets.

View voidfiles's full-sized avatar

Alex Kessinger voidfiles

View GitHub Profile
@voidfiles
voidfiles / discuss.html
Created February 8, 2014 00:23
An alternate way to discuss things.
<a href='javascript:var dsqs = document.getElementById('disqus_thread'), s = document.createElement('script');s.id = 'adn-comments';s.src = 'https://d105v2jof9gtr3.cloudfront.net/embed.js';dsqs.innerHTML = '';dsqs.appendChild(s);'>Discuss</a>

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

@voidfiles
voidfiles / README.md
Last active August 29, 2015 13:58 — forked from mbostock/.block

This choropleth encodes # of hate groups with data from the Southern Poverty Law Center.

<form id="checklist">
<fieldset>
<h2 id="alignment"><span>Alignment</span></h2>
<p class="description">Unifying group and individual direction and goals around the singular vision of the organization.</p>
<ul class="check-list">
<li class="check-item filter-item i1 culture">
<label for="01_cm1" name="01_cm1" class="label">
@voidfiles
voidfiles / dispatch.py
Created August 18, 2009 08:10
one page python mp3 server
#! /home/alexkess/opt/bin/python
# One file mp3 server.
# Need newish version of sqlite3
# python2.5 or python2.6
# INSTALL
# get id3reader from here and install on path http://nedbatchelder.com/code/modules/id3reader.html
# easy_install pod
NO_NEWF = False
try:
from newf import Application, Response, ResponseRedirect

Short Stories By Alex Kessinger

I read this post by merlin man, about short stories and it inspired me to write a short story. I thought this might be something I do again in the future. So here is a git hub gist I will use to store short stories.

Inspect Before Opening - 2009-08-24

Our first child took about 9 months to gestate, almost a whole year. During that time, an inordinate amount of time was spent talking about our baby. We still do this, but at the time I was new to the overwhelming obsession. When we finally decided to get the baby out, it took almost 16 hours, well maybe 16 hours but after 4 hours of doing nothing but watching your wife get a baby out you forget about time and just focus on helping her, at the end this thing plopped out, and they wanted me to hold her. I couldn't, just for second I had to wait for just a moment. It still don't know exactly what it was. I was overwhelming emotion

function Subscriber(){
this.events = {};
}
Subscriber.prototype.create = function(event){
if(this.events[event]){
return;
}
this.events[event] = [];
"""
I use this as a pull cache/pseudo-CDN for a production environment. I use this as a fallback static file server, if the file doesn't exist already on the server. If my server doesn't have a file, like an image, I then pull the file from the fallback server, or origin server. This can be my box, or more likely if I am pulling from a 3rd party site, I can cache the file on my servers, instead of having to constantly hit the other site.
I put this in my apache .htaccess file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L]
This serves the file if it exists else, it falls back on my django fcgi.
I use this because my website http://staytuned.in is hosted on http://www.dreamhost.com
# Style Rules
JS Javascript
javascript Javascript
Ipad iPad
ipad iPad
Iphone iPhone
iphone iPhone
(function(){
var cvp = $.cookie("picplz_viewpref"),
nvp = (cvp===null) ?
"mobile" :
(cvp==="web") ?
"mobile" :
"web";
$.cookie("picplz_viewpref",nvp, {"path": "/"});
})()