September 3, 2015

Auto-attaching to Screen using Fish Shell

Another post about the excellent Fish Shell, this time about how to configure it to automatically start "Screen"

Using the simple and clean fish shell language, I whipped up this little function, which will start screen, reattaching to the old session if possible, and starting a new one instead if not:

function screen_auto_attach
  if [ -z "$STY" ]
    exec screen -dR

Then just call it from your .config/fish/ shell with “screen_auto_attach”.

Using Virtualenv with Fish Shell

I am a huge fan of the fish shell, and I wanted to use Python virtual environments conveniently while in the shell.

Of course, if I was using cranky-old-bash-shell, I’d just use the excellent “virtualenvwrapper“, but I’m not.

It turned out to be not that difficult to make a workalike to virtualenvwrapper using Fish, including help and tab completion of environments.
[Read more...]

Technorati Tags: , ,

Moving to eVoice from Google Voice

I was a GrandCentral early adopter. I scrambled to get an invite code, and got in on the beta. Then Google bought them and converted the service to “Google Voice.” I’ve used the number for years now as my main business number. It simply forwards the calls to the numbers I’ve set up.

(Cue impending doom music)

I got a call yesterday from someone answering a job application I’d posted.  He told me he’s been trying to call all week, but that he kept intermittently getting “this number is not in service.”  He said out of 8 calls, he connected twice.  Ouch!

So, Google Voice is OUT

Searching for a Virtual PBX isn’t easy.  I spent hours looking at review sites (which mostly have outdated information), and finally bit the bullet and signed up with eVoice Moving to eVoice from Google Voice

So far, I am extremely impressed.  Let me tell you why I chose eVoice, and why I am more impressed than I thought I’d be.  I actually think they are underselling their service …

[Read more...]

Technorati Tags: , , ,

Howto Move a WordPress 3.0 Site

When developing this site, and it’s sister sites &, I decided to use the new multi-site feature of WordPress 3.0.  Everything went great during development.

What I did was to develop using a local address of “” as my base site, and then add all the other sites using the WPMU features.  So I had and as well.

All was great, until it came time to make the sites live.  I did what I used to do.  I dumped all my data from the database, opened it in an editor, and replaced “” with the live domain name that is acting as the master control for this site.

It worked!  Sort of.  It showed my blogs, but I couldn’t login.  WordPress kept complaining about needing cookies enabled.  But … but … they are enabled!

Fixing it took a bit of trial and error. [Read more...]

Technorati Tags: ,

Bluehost Hacked this week

One of my clients was hacked today. Unfortunately, they are hosted at BlueHost, which is cheap but doesn’t seem to pay a lot of attention to security.

It turns out that many sites on Bluehost got hacked last week by someone installing malware which somehow involves “”. It is easy enough to see if you are hacked. FTP a PHP file from your site and look at it. Does it start with “base64_decode” followed by a bunch of gobbledygook? If so, yep, you are hacked.

Here’s what I did to fix it, it took about 10 minutes:

  • Delete everything in the “public_html/.files” directory.  That’s a bunch of spam.
  • Delete every php file on the server
  • Upload all of them again, you do use version control, right?

Alternatively, you could try using the script from this site, which explains what is going on.

If you have a business site and use my support service, I’d already be doing this for you.  You would already have backups, and you would have version control. This would just be a blip on your day, followed by an email from us explaining what we did to recover.

Modifying Widget Titles in WordPress

On a recent project, my client wanted graphical headers for the widgets on her WordPress blog. Unfortunately, widgets are not that easily themed. Nor can you do this in CSS.

The internet was no help. Lots of people were suggesting using a “dyamic_widget_params” filter. Nope, that isn’t what I want. I don’t want to modify before and after the title, I want to actually change the title.

But, with some poking around, I figured it out. It’s actually pretty easy.

[Read more...]

Technorati Tags: ,

How To Run Sandboxed Django Sites in Production

Recently, I moved all my sites from a dedicated server to a great VPS over at SliceHost. I took the opportunity of “the big move” to fix an ongoing problem I’d had, which was that all four of my Django sites were using the same libraries.

Ouch! That meant that I couldn’t update any of my sites without updating all of them, or at least retesting all of them.

This article will explain how I sandboxed my Django sites, so that all of them have their own versions of the appropriate library, and how I have them all running on the new production server.

[Read more...]

Technorati Tags: , , ,

Running WordPress on Lighttpd

I’ve finally moved the site to a new server.  My new host is a 1 gig slice at SliceHost, which will be hosting all my sites (yes, I really need a 1 gig slice) from now on.

One of my big goals was to completely drop Apache.  I just don’t like that server.  Ugly to configure, huge, slow & bloated.  I much prefer Lighttpd for my Django & Satchmo projects, but I hadn’t ever tried using it for PHP.  Today I bit the bullet and started the transition.

[Read more...]

Speaking at DjangoCon 2009

I’m going to be presenting at DjangoCon 2009!  The 45 minute presentation will be on the advanced use of Django signals to promote reuse.

I’ll be using Satchmo as an example of how to create very useful custom signals to allow for some quite complex customizations. If you want a copy of the presentation, please sign up below and I’ll send it after the convention.

Django, the web framework for ponies with magical powers

djangopony Django, the web framework for ponies with magical powers

Last year at DjangoCon, one of the most interesting sessions was the one where people presented their “pony requests”, and made a case for their pet feature to be built into Django.

Shortly after that, the first logos for the Django Pony began to appear, followed by the inevitable (in retrospect)

This morning, I discovered that NASA uses Django and even has a Django Pony page.

Fly, little pony, spread your meme wide!

[tags]django pony, django, djangocon[/tags]