October 13, 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/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...]

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...]

Howto Move a WordPress 3.0 Site

When developing this site, and it’s sister sites ecomsmith.com & gosatchmo.com, 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 “blogs.dev” as my base site, and then add all the other sites using the WPMU features.  So I had coderseye.blogs.dev and ecomsmith.blogs.dev 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 “blogs.dev” 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...]

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 “www.domainameat.cc”. 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.