I’ve grown to become a huge Vim fan over my years of programming, probably
beyond what most people would call normal. I think my interest in Vim stems
from my interest in the tools that I use to code; I appreciate the manner in
which I write code almost as much as the code I write. In the craftsman
philosophy, I’m a big fan of functional tools that serve their purpose well,
CoolTools for example. In the hacker philosophy, I’m a big fan of
constantly improving and hacking everything to achieve that, my terminal
and Vim for example. Vim is a great tool that continues to show me new
tricks every day but I think that with my understanding of Vim, it’s time to
give back and advocate for Vim’s awesomeness.
Several weeks ago, a friend linked me to Sausage.js, “a jQuery UI widget for
contextual pagination.” I would call it more of a sidebar navigation widget.
The example page was intriguing and prompted me to add it to this blog.
Requirements
My inital goal was based off the CouchDB example linked on the Sausage
homepage. I was slowed down by trying to figure out the exact JS and CSS
requirements, which aren’t specifically listed out, and some conflicts with my
local CSS for this blog, the main Sausage div requires height 100% and I had
something else set to 100% height which didn’t work well…
Earlier today, the private key from Apple’s Airport Express was found and
released, along with some Perl code, finally allowing for anyone to create
their own “Air Speaker” without using the Airport Express. With this code, any
OSX or Linux computer can now be turned into an AirSpeaker, that any iPhone or
iPod Touch, or iTunes, can now stream music to seamlessly. This really is
fantastic because it allows a great deal of flexibility with how you play
music, which has been limited for years now.
Or more specifically: search and replace using the current visual selection.
Lately with my job, I’ve been spending more time refactoring old code than
writing new code. Refactoring and manipulating code (and text) is something
that I think Vim is great at, once you really understand the different modes
and motions that Vim has, see Stack Overflow for a good
summary. Vim’s Search and Replace mode is what I’ve
primarily been using and while refactoring, I found some Vim tricks I wanted to
share.
I spend alot of time at my computer and with that much usage, have both
speakers and headphones for different hours of the day. I was initially
physically swapping 3.5MM audio output plugs on my speakers, lotsa actual
effort! I then figured out I could plug my headphones into the “rear” speaker
output and switch output through the audio control in OSX, much easier! But
that was even work, to open the audio panel and chose the correct
source, so today I figured out how to toggle sources in Applescript and the
command line. I then bound that script to a keypress and now I can toggle audio
sources much easier!
Fabric is a Python CLI
tool for interacting with remote servers, that I’ve been pushing at work the
last few months. It’s great for organizing simple tasks to run locally or
remotely, this blog is even being deployed using Fabric
currently! It’s a great tool.
The two main ideas of Fabric are that you have hosts and tasks you apply to
those hosts. Fabric uses fabfile.py as its default instruction file, similar
to a Rakefile or makefile. From a command line, you can call multiple tasks on
a host and they will get applied in the order you called them. Hosts can be
defined staticly in the fabfile through a variety of methods, but this gets
hard once you have multiple hosts that can change easily with cloud
computing/VPS solutions. I found a straight foward way to handle this was to
have a task which defines which host I want to use, then the actual task I want
to run on that host; calling fab production task1 or fab staging task1 to
run task1 on my production or staging server.
I attended my second Shmoocon earlier this month in Washington DC, a conference
which I’ve begun to describe to my friends as a ‘hacking and security’
conference. Shmoocon is a wonderful mix of computer security folks, physical
security folks (lockpicking), and hackers (folks just interested in how things
work). It’s fun to attend and find many examples that prove you really aren’t
as safe as you thought, you really can’t trust most companies or people, but
there is plenty that you can do about it, once you know to how to defend
yourself. One of the best things Shmoocon offers is a different perspective on
the world, which I always savor.
I saw recently on PyPI that blogofile, the Python blog engine that
builds this blog, updated to version 0.7. This prompted me to upgrade my blog
from 0.6 and detail the changes here, since the blogofile docs don’t seem to
have kept up. For the most part, this was discovered through trying to build my
blog until it worked. I used the the blogofile init simple_blog and
blogofile init blogofile.com projects as examples of “working” 0.7 projects
and pulled code from them when my 0.6 code wasn’t working.
It’s bad enough that I cannot get FIOS at my apartment and am stuck with Comcast
cable, but their website is a terrible mishmash of redirects and “preloading”
pages, making it near unusable. My only reason for using their website is to
verify my automatic billing is setup and that my bandwidth usage is below their
250GB cap. I decided to automate this and through feedback from other Comcast
users, found some interesting results about their bandwidth caps.