May 2012
1 post
Switching to a password manager (SuperGenPass)
Some discussion with a friend of mine prompted me to finally start using a proper password manager and stop sharing passwords. Up until now, I’ve basically been using one password for everything non-crucial (i.e., any random site that requires a signup) and another (only slightly different) password for important stuff like email and banks. So I’ve basically been doing a horrible...
April 2012
1 post
2 tags
From Vim to Emacs + Evil mode and back again
I spent the past few days trying to switch from vim to emacs + evil-mode, and setup was a little more of a pain than I hoped. For example:
Couldn’t get a color scheme to work right in terminal emacs after lots of twiddling/Googling so I was forced to use GUI emacs which throws me off since a new window opens whenever I edit anything
Couldn’t get non-ugly fonts in GUI emacs....
March 2012
1 post
3 tags
Trying out Ember.js and building TangleTube
A couple weeks ago I decided to finally look into the recent surge in JS MVC frameworks. I decided to build a little web app that lets you group YouTube videos and play them at the same time, with options for volume and start-time per video.
Here’s a finished example if you have no idea what I’m talking about.
So I started with Backbone and got a working version, but I wasn’t...
January 2012
3 posts
2 tags
On switching to Arch Linux
So you’re thinking about switching to Arch. Here are some things you should probably know first.
(I’m assuming you already know all the great things about Arch — otherwise, you wouldn’t be thinking about switching — so I’ll skip that part).
Potential downsides to Arch
First of all, nothing works out of the box. You will have to manually set up the driver...
How to set up a Clojure/Noir website on WebFaction
Setting up a Noir site on WebFaction is surprisingly easy, thanks to Leiningen. Here’s how I did it. I’m assuming you already have the site built in Noir and you basically know your way around a Linux machine.
Note, this assumes that you haven’t already installed Clojure or Leiningen, but that you already have the JRE, which I believe comes by default on all WebFaction...
December 2011
1 post
Ted Dziuba on Taco Bell programming vs. using what...
If you haven’t read Ted Dziuba’s post on Taco Bell programming, go do that now. It’s really a great post.
The gist is basically that we can and should be writing programs using the stuff that’s been available for tens of years, stuff like bash and xargs and find, and that using the latest and greatest tool or language simply adds complexity and bugs. He compares it to...
September 2011
3 posts
My minimalist setup
I recently completely changed the setup on my main laptop to something much more minimal than what I was running before (vanilla Ubuntu). I decided to post this braindump here just as a way of telling myself “this is it” and acknowledging that it’s time to quit tweaking and be happy. I love this setup.
Hardware
My laptop is just a plain old Thinkpad W510 with a 15”...
Running custom Django commands via cron on...
Update: a much more detailed guide is right this way which might be easier to follow than my quick post below.
The typical way of running Django commands via cron is usually something like:
0 * * * * python /path/to/django/manage.py commandname
…but that won’t work on WebFaction. You have to tell it what your PYTHONPATH and DJANGO_SETTINGS_MODULE should be set to, as well as give...
August 2011
5 posts
2 tags
How to kill a dead SSH session gracefully
I have a bad habit of leaving an open SSH session sitting there and then coming back to it to realize that it’s dead. In the past, I’ve just killed the terminal to end it. Here’s a better way:
<Enter>~.
That’s the enter key followed by the tilda character followed by a period.
To explain, SSH has a few different escape sequences. To see them, run ~? while in an...
1 tag
My quest for a tiling window manager
I’ve never used a tiling window manager before, but lately I’ve been doing more and more with the command line, and I’ve been using vim-only for almost a year now, so it seems like a natural next step.
So I went through a few of them over the weekend looking for the right one. But first, some background.
What is a tiling WM?
Most computers have “floating window...
Custom Lookit panel icon to match Faenza icon set
i’m a big fan of Lookit, a really simple screenshot app that runs as an indicator applet in your panel. Only problem is that its default icon is flat black and looks terrible with most icon sets, including Faenza, which I use.
So I made a new one to match. Here’s the end result (it’s the camera icon):
If you want to download it, here’s the link. To install it, just...
pushd and popd
onethingwell:
A pair of very useful commands, pushd saves the current directory and (optionally) changes to a different one; popd returns you to the saved directory:
$ pwd
/home/you/directory
$ pushd /somewhere/far/away/in/the/filesystem
$ pwd
/somewhere/far/away/in/the/filesystem
$ cd /somewhere/else
$ cd /yet/another/place
$ popd
$ pwd
/home/you/directory
How to use xmacro on Ubuntu
I just had a situation where I had to do the same copy and paste job in a browser a few hundred times, so it was the perfect opportunity to look into a desktop macro recorder/player. I came across xmacro which records X11 events and lets you play them back later, and it worked perfectly after I figured out how to use it.
First, just install it with:
sudo apt-get install xmacro
Then...
July 2011
2 posts
1 tag
June 2011
1 post
May 2011
1 post
Django: passing request.user to a form
So you need access to request.user in your form for some reason, but you can’t just pass random objects to forms, and only the views have access to request. Here’s how it’s done:
Add an __init__() function to the form which looks like this:
Then, when you call the form from the view, add a new user parameter, so it looks like this:
Now you can access self.user anywhere in...
April 2011
3 posts
Command-T for Vim on Fedora (missing ruby.h...
I just spent like an hour with this nonsense. If you’re getting all kinds of errors about how ruby.h can’t be found no matter what you do, then you probably need to install freaking gcc
sudo yum install gcc
Thanks for the helpful error messages. Not.
Episode 0.5.6 - Vim with Drew Neil, Tim Pope, and... →
thechangelog:
Wynn sat down with three Vim users and experts to talk about tips and tricks for using and pimping the popular text editor.
Download MP3
Dropdo has the beginnings of a blog at http://t.co/cQRhtBm …now trying to get the @dropdo account from the guy who isn’t using it.
March 2011
3 posts
1 tag
RT @smashingmag: dropdo: a quick and simple file viewer online - http://dropdo.com
3 tags
Allowing Gmail keyboard shortcuts to pass through...
If you’re using Pentadactyl and you’re bothered by the fact that it keeps eating your Gmail keyboard shortcuts before Gmail can see them, then you need to set a passkey for Gmail. I had trouble finding the correct syntax for this, but here it is (just throw this into your ~/.pentadactylrc and restart Firefox):
set passkeys+=mail.google.com:jkroae<CR>,gi
Note that all the...
February 2011
1 post
2 tags
BlackBerry WebWorks and the same origin policy
Say you’re coding a website, and you need to grab a section (perhaps a specific ID) of an external website to display on your site, via AJAX. You can’t just grab the page via AJAX because it violates the same origin policy, which states that you can only grab pages on your own domain.
As a workaround, people usually create a serverside proxy of the remote site. So if you’re...
January 2011
9 posts
3 tags
Charlie is CRAZY
2 tags
Using DuckDuckGo as a link dropper
Update 1/27/2012: The new short URL for DDG is http://ddg.gg so use that in place of http://dukgo.com
I’m often chatting with someone or sending an email and I want to link them to a search for something, or even just the first result in a search for something. For example, if someone asks me what I use to take screenshots, I could link them to the first search result for “lookit...
1 tag
sight: The Syntax Highlighter for Chrome →
I’m using this, and it works really well. Check it out if you’re a Chrome user.
thechangelog:
Thanks to Tomás Senart, I’ve regained my Sight when looking at source code in the browser. Sight is another extension for Google chrome that provides:
Auto syntax highlighting for a long list of languages
Several TextMate-inspired themes
A number of eye-soothing fixed-width fonts
...
2 tags
Why would anyone use vim?
(Note: this is a post for vim newbies. If you’re an experienced user, you won’t find anything new here)
I recently switched to vim full time after years of asking myself that question. It seemed like a huge percentage of the better hackers I came across used vim, but all I could see was “no mouse, no IDE goodies, no deal.” Why would anyone subject themselves to that?...
3 tags
Why I'm using DuckDuckGo instead of Google
DuckDuckGo is now my default search, both in the browser and on my phone. Here’s why:
!Bang syntax
DDG has a cool little feature that lets you search tons of websites directly, using !websitename. For example, if you want to search Drupal.org directly, type “!drupal whatever search terms” and you will be taken to a Drupal.org search for “whatever search...
2 tags
A rundown of keyboards for Android phones
There are a ton of keyboards you can use instead of the Android default. Here’s my take on them.
Default (pre-gingerbread)
Nice, quick and simple. Light footprint and does decent job with the auto correction. No multi touch support, no alternate layouts, nothing fancy.
Swype
The current leader in the swipe typing category, in competition with the ShapeWriter and SlideIT. Does a pretty...
1 tag
Geez can we revert that? RT @timmillwood: OMG! What’s happened to http://drupal.org! Sorry, I’m no designer, but that doesn’t look too good.
2 tags
Toggling between event handlers using jQuery's...
Ever been in a situation where you need to do something on click except if it’s already been done, in which case you undo it? Previously, I would do this by setting a class on the first click and then checking for that class to see if it’s already been clicked.
Turns out, there’s a function that makes it easier. Just sticking this here in hopes that someone else stumbles on it.
December 2010
4 posts
RT @drupal: What do a million nodes add up to? A truly amazing and prolific #Drupal community! http://drupal.org/node/1000000
Do any of you use ubuntufunnel.com? I’m thinking about just letting the domain expire in January.
3 tags
Use jQuery to fade to a different background image...
There’s a pretty common and nice looking that lets you fade to a different background image when you hover over a link, div, etc. For an example, see Dragon Interactive’s navigation. That method basically involves adding an empty span tag inside the link or div, and setting it to take up the full available space but be transparent. Then, on hover, you fade it into view (and you can set...
November 2010
3 posts
RT @goturnip: Close to rolling out a heavily reworked UI! Screenshots: time page: http://i.imgur.com/CFebV.png tasks page: http://i.imgu …
2 tags
RT @goturnip: Turnip is officially in free open beta and we’d LOVE for you to give it a shot. Let us know what you think! http://goturni …
October 2010
11 posts
Really digging Chive as a nice alt to phpMyAdmin. http://www.chive-project.com/
Bookmarked: Validating & Submitting Forms To Other... →
This was a huge lifesaver for me today but it took me forever to find it (maybe my Google-fu is off right now), so me posting this is my attempt at increasing its SEO.
It’d be super sweet if yous guys could like the FB page of an app I’m working on so I can set a custom FB URL for it. http://on.fb.me/a3jikH
Everyone welcome my wife @charliesmom528 to Twitter!
2 tags
Trying out Komodo Edit once again. Anyone have any recommended addons/tips for Drupal development on it?
2 tags
Crazy awesome slow headnodic version of "Crazy" by... →