Wednesday, January 22, 2014

Set up an active GitHub repo with a single bash command

There should never be any barrier between thinking of something and putting it on GitHub.

With that in mind, here's a very short bash function + alias I use to get a repo up as quickly as possible.

# github
function new_github_repo(){
    if [ -z "$1" ]
        then
            echo "Usage: github [name]"
        else
            USER='YOUR_GIT_USERNAME'
            curl -u "$USER" https://api.github.com/user/repos -d '{"name":"'$1'"}'
            cd ~
            mkdir $1
            cd $1
            touch README.md
            git init
            git add -A
            git commit -am "Initial commit."
            git remote add origin git@github.com:$USER/$1.git
            git push origin master
    fi
}
alias github='new_github_repo'

Saturday, January 11, 2014

Iron Blogger!

Great news-- I made it through the rigorous application process, and have been accepted to Iron Blogger Boston!

A big part of why I'm doing this is to participate in the One Cool Thing Per Week (OCTPW) initiative.  Briefly, this is something I just made up where I present one short project per week that I find "cool".  Most of these will be software projects, with a few hardware and maker things thrown in.  I encourage others to join me on this endeavor.

Outside of OCTPW, I will be posting my usual smörgåsbord of random observations, factoids, and anal-expulsive cynicsm for future archaeologists to puzzle over.

On a side note, I'm going to be using Stypi as a word processor for all of my future posts.  If you haven't used it, you should!  It's one of my favorite examples of featureset minimalism on the web.  Very unix-philosophy-y.  

(I do wish I could synchronize it with my blogging software, though.  Anyone?)

Saturday, October 19, 2013

Mint.com running total bookmarklet

Drag this link into your bookmarks bar, and click it when you're looking at your transactions on mint.com!

Annotated code below.


Monday, July 22, 2013

A simple one-liner for repeatedly querying a remote XPath from the command line!

I often want to monitor a single element on a page, but I don't feel like firing up python to make it happen.

Using a tool called xidel, this command will write the results of an xpath query to a file every 300 seconds:

yes "xidel YOUR_URL_HERE -e \"YOUR_XPATH_HERE\" 2> /dev/null; sleep 300"|sh > output.txt

Here's a working example:
yes "xidel http://www.indiegogo.com/projects/ubuntu-edge -e \"/html//p[@id='big-goal']\" 2> /dev/null; sleep 300"|sh > output.txt

Sunday, February 10, 2013

The Best Terminal Font

Misc-Fixed-6x13, a.k.a misc-fixed, a.k.a. "Fixed", is the best font for the terminal.  I can offer no scientific proof.  In my eyes, however, it is the most balanced and correctly-proportioned monospace pixel font, regardless of availability or license.

Here is a link to its current home.  Here is a link to a TrueType (.ttf) version I created this morning.

Tuesday, July 17, 2012

The Rotary VOIP Phone

This is a project I've had brewing ever since the extraordinary Raspberry Pi project was announced.  It's a fully-functional VOIP device cased in an old Western Electric rotary phone!  You can use the dial to place calls, and talk via the receiver.  Calls end when the receiver is placed back on the hook.

Thursday, June 28, 2012

The Supreme Court Might Kill 1.1 Million People Today

A quick back-of-the-envelope calculation:

Assuming the Senate Bill, the 95% of the nonelderly population of the USA (or 86.7% of the total) would have insurance by 2021.  Assuming 325 million people in 2021 (1), and 82% coverage without the legislation (2), an extra 36.6 million people stand to be covered (this number is pretty close to the one estimated by the CBO-- 34 million (3)).

Assuming the uninsured face a 3% increased mortality rate over eight years (5), overturning this legislation will be responsible for roughly 1.1 million deaths from 2021-2029.

Citations below the fold.


Wednesday, November 18, 2009

Two Serious Questions

How often do you click "Follow us on Facebook" links from a company's website?

How different is this from a web ring?

Tuesday, September 22, 2009

Thank you John Carmack

A note about something I just realized.

The most anticipated computer game ten years ago was Quake 3.  It was one of the few core games that seemed guaranteed to transcend the core market-- Gamers would see it as the next way to compete.  Normal people would play it casually with friends.  Geeks would play it for the dynamic lighting and curved surfaces.

When the demo was released, the Mac and Linux versions came out first, which sent an enormous amount of Windows users scrambling.  Because this was years before installing Linux convenient in any way, it forced a great number of people to learn about booting from floppies, partitioning, filesystems, the command line, installing proprietary video drivers, and a host of other Linux-y skills.

It took me four days to get to the point where I could even run the game, but I got to enjoy it three days before my friends.  And it set me on a path that I've been on for ten years.

Thanks, John!

Saturday, July 18, 2009

An Open Firefox Feature Request

I love tree-style tabs.  It suits my [scatterbrained] working style to have 50+ tabs open at a time.  I almost always middle-click links to put them in a new tab. This way, I can leave parent pages completely untouched while I go off on tangents, compare notes, etc.  I eventually return to the page I started on and continue on my merry way.

Increasingly, links no longer point to discrete pages but DHTML elements that are meant to change the appearance of the parent page.  They can't be opened in a new tab, and there's no reassurance that they won't mangle the page beyond recognition.  Not only that, but they're hard to identify-- Generally their destination ends in an anchor tag (i.e. "#content"), but other than that they are indistinguishable from normal off-page links.

I propose that middle clicking these links opens an overlay that can be easily closed.  This way, the damage can be undone, and the browsing experience can continue uninterrupted.

Thursday, June 11, 2009

Well, that was an experience

This morning, I decided to take a short detour to Radio Shack to pick up some magnet wire.  While the decision seemed perfectly reasonable at the time, it lead to a very unreasonable series of events-- Starting with a bike ride across town to visit three different stores, and finally culminating inside a local machine shop where a toothless, semi-drunk store employee wrapped five feet of wire around a pencil and gave it to me free of charge. 

It's not that I'm upset about the day's events per se but the confused expressions on people's faces when I asked to buy such a common item.  Magnet wire is in virtually everything.   I concluded two things:

1)  I visited three very bad electronics stores.
2)  Tinkering with electronics is not as common as it should be.

Friday, April 24, 2009

In my dreams

Last night I had a dream that my parents had chartered an Antonov 225 cargo plane for a family trip to Pierre, South Dakota.

The plane had been massively upgraded.  Inside, it featured essential creature comforts like champagne, wi-fi, and a racquetball court.  The engines (and structural framework) had also been upgraded at great cost to allow for supersonic flight.

This unfortunately meant that I would reach destination of Pierre much faster.

Tuesday, March 31, 2009

The Most Disturbing Part About Twitter

...is that suddenly people like John Cleese, Shaq, and Ted Nugent have a better understanding of an applied technology than I do.

Jason Belmonte, Bowling Radical

Two days ago, an Australian man named Jason Belmonte walked away with the PBA tour title.  He's the first person to win using a two-handed technique:

http://www.firegeezer.com/wp-content/uploads/2009/02/jason-belmonte-a-lat.jpg

Apparently, involving both hands allows him to achieve a greater amount of spin (630rpm versus the average professional's 400rpm), creating a significantly more forceful pin strike.

It's amazing to me that a sport as old and as simple as bowling can be revolutionized by single, somewhat obvious innovation.  I suppose Jason Belmonte can now join the ranks of Dick Fosbury, Rick Barry, Pete Gogolak, and other sports luminaries who did things the "wrong" way to great effect.

Thursday, March 26, 2009

Google, we hardly knew ye

News broke today of Google's latest wave of layoffs-- 200 employees in marketing and sales.  This adds to the 100 layoffs in recruitment and the 40 in the now-defunct radio program.  So, 340 since January. 

The company wrote:

"In some areas we've created overlapping organizations," Google said. "We over-invested in some areas in preparation for the growth trends we were experiencing at the time."

Two years ago, the phrase "overlapping organizations" would have been unthinkable in the same breath as "Google".  Now, it's hardly a surprise-- In fact, their stock actually rallied today despite the announcement.  Google, once organized into perfect and discrete elements, now sprawls into social networking sites and blogs-- a sort of slow bloodletting for its formerly iconic brand image.

Its core applications like Mail, Maps, and Docs have been suffering at the hands of the Labs, Gadgets, Themes, Gears, "Older Version", and other features that have added complexity without improving extensibility.  What's worse is that these features are totally inconsistent-- Labs and Themes only work for Mail, Gadgets only works for Sites and iGoogle, Offline only works in certain browsers at certain times.  Of course, none of these things work in Google Apps. 

Confused yet?  I am.

I don't think it's premature to say that the Google is finished as an innovator.  Many large tech companies have followed a similar arc:  A single great brand that spawns an entire culture, leading to the hiring of young talent, bonuses, a blockbuster IPO, and years of industry dominance, followed by a slow dissolution of the brand as the company grabs at new and seductive revenue streams.

Obviously, this isn't the end of Google.  With the sheer amount of talent and money they have locked up, they'll continue to release new and sometimes excellent products.  The game-changers, though, are all used up.

Monday, February 23, 2009

Let there be light

Those of us who have lived in the Northwest know the importance of sunlight in our energy, mood, and productivity.  Even if you hasn't self-diagnosed with Seasonal Affective Disorder (SAD, appropriately), there's no doubt that summer hours are a welcome transition.  Google trends shows in the greater United States, searches for "depression" are about 50% more common in the winter than in the summer.

According to this map of solar insulation, the Northwest is perhaps the darkest part of the mainland US during the winter:

http://i37.tinypic.com/2s667go.jpg

While I don't know much about the biology of sunlight, I do know that the Northwest has a reputation for chemical imbalances.  It manifest in our music, politics, propondance of serial killers, our glut of cafes and bars.  Individuals tend gravitate towards opposite ends of the extreme:  A long, deep, brooding in the winter, followed by bouts of impulsiveness in the summer.  Loathing self-desctruction combined with fitful creativity.

What's more is that during the late summer, it actually becomes brighter than just about anywhere in the east:

http://i37.tinypic.com/11kw3td.jpg

So why am I bringing this up?  Over the year, sunset and sunrise times vary according to a sine wave, and we're just about to enter the period of the most dramatic change.  In one month, we can expect another 96 minutes of daylight.  Sunset happens about 1.6 minutes later each day.  With daylight saving time (March 8), most of us will probably enjoy another hour of waking sun each day. 

So, Northwest residents, armed with this knowledge, I urge you to use your early-spring manic cycle wisely.



Tuesday, January 20, 2009

San Francisco

I'll be in and around San Francisco from 1/22 to 1/29.  Just sayin'.

Thursday, January 15, 2009

Harper's Index 2000-2008

I always skip to the "Numbers" (or is it "Figures?") section of TIME magazine before I read anything else. So  imagine my excitement when I found this huge list of figures, compiled by Harper's, for the Bush era:

http://harpers.org/archive/2009/01/0082319

It's a little bit factual, a little bit editorial, and a whole lot of sad.  I love this kind of format, though.  Numbers don't lie.

Wednesday, December 17, 2008

An Update

Since Tuesday, I have been more flu-ridden than I ever remember being in my adult life.  The last time I remember being this ill, the Princess Bride was a relatively new movie and I was being spoon-fed chicken noodle soup and drinking 7-up through a straw.  This time didn't go as well, beginning with a distinct lack of chicken noodle soup and eventually transforming into an annoying and expensive case of pneumonia.  There's a lesson to be learned, here.  However, I'm finally on the road to wellness, and for that I am grateful.

Moving on.

I'm excited to say that I finally reconfigured one of my favorite applications for any platform-- MobilePushr, a Flickr uploader for iPhone.  It's a stunning example of how high function can be met with an absolutely minimal interface.  It's a very simple program in concept (push a button, upload all photos that haven't already been uploaded, done) but its existence completely changes the way I use my cameraphone.  It just does exactly what I want it to do and nothing else.  The author exercised remarkable restraint by not including a bunch of useless features.

I am still working at Old Town Computers and enjoying it immensely.  I'm also working on my web design side-project, XOdesign.  Yet, I am becoming wary of those guys who call themselves "Web Producers", wear business casual even though they work at home, and hammer out 15 identical Wordpress-based Web 2.0 disasters every day, then keep a blog about the newest trends in typeface.  I never thought I'd come close to becoming one of them, but here I am at the gates of the lamest Internet fraternity.

It's supposed to snow six inches tomorrow.  Maybe I'll take some pictures of that happening.