Default Browser Trick for Virtualized Guests

Long story short, I use a Windows virtual machine on my workstation at work. I use qemu/kvm, and I use the user-mode networking stack for simplicity in setting up the VM. This trick should work with just about any virtualization package out there.

I wanted to be able to click a link inside the VM and have my browser on my host Linux machine open the link. I have no reason to run another browser inside the VM, and figured that it'd be nice to get this set up.

My host workstation is Arch Linux, and I use Firefox. From the command line, if I'd like to open a linux in firefox, I can run firefox <URL>, where <URL> is where I want to go. If firefox is running this opens the link in a new tab. This only works if two environmental variables are set: DISPLAY ...

Continue Reading

Permalink | Posted: Apr 18, 2011 | Tags: Virtualization Open Source Linux Firefox

Optimizing for Shared Hosting

Shared hosting, no matter how their packages are painted, have limits. Staying away from hogging too much CPU, memory, and other resources can ensure the longevity and performance of your shared hosting account. If you are just looking into how to build a site, or if you already have a very busy site on shared hosting, these guidelines can help you get the most out of your shared hosting account before making the switch to more expensive hosting. One of the goals in this post is to encourage "good neighbor" practices that will ensure you aren't disrupting fellow users on the server that hosts your account. This also ensures that you won't get any of these principles also apply to other types of hosting, but this is written with shared hosting in mind.

Common bottlenecks

With modern shared hosting, you generally have plenty of available disk space and ...

Continue Reading

Permalink | 1 comment | Posted: Jun 10, 2010 | Tags: Django Open Source Bluehost Hosting FastCGI

PRK Laser Eye Surgery Part 6

Follow Up Visits

The follow-up visits followed the format of essentially an eye exam to test for power and astigmatism. The results were different each time I went. After that was determined, the doctor looked at my eyes with his eye microscope (the thing that you rest your chin on, and he shines a vertical line of light into your eye). My protective contacts had to be removed for this part, and replaced after. This continued as long as my eyes were still in their initial healing stages. The first time or two I went, this was by far quite miserable. Once the first layer of my eyes had grown back, the contacts weren't needed any more at all.

During the whole healing period, my eyes wavered between near sighted, far sighted, some astigmatism, no astigmatism, different astigmatism, etc. At my four month mark, all of that had subsided ...

Continue Reading

Permalink | Posted: May 02, 2010 | Tags: PRK

PRK Laser Eye Surgery Part 5

Optimizing My Desktop and Applications for Wacky Eyesight

This post was the initial motivation for writing about my PRK surgery on my blog. This contains what I did to make my workstation usable while my vision was a problem due to light sensitivity and healing.

X and DPI

My modifications started before my surgery. The first thing I wanted to do was to force a different DPI in my X server. I was running fluxbox with the "tar" theme, and logging in using gdm. I realized it was a touch easier changing the command for the X server if I switched to slim, so I dumped gdm. I just added -dpi 110 or so as an argument to be passed to the X server to effect the change. The higher the DPI, the "smaller" that believes the display is, and the more pixels it will take for the ...

Continue Reading

Permalink | Posted: Apr 30, 2010 | Tags: PRK Linux Greasemonkey JavaScript

PRK Laser Eye Surgery Part 4

Immediately After the Surgery

The Saturday after the surgery was great. I even drove to the hardware store. I needed my sunglasses, but I definitely could see well enough to drive. I even put up shelves. I couldn't see well enough for sitting far away from the TV or working with small text on the computer, but I was able to drill holes, etc…

Come Monday, I was pretty miserable. That first layer had started growing back already, which makes for a very uneven optical surface on the eye. No more driving for a long time. My sunglasses essentially replaced my regular corrective glasses. I put them on when I woke up, and took them off before bed.

My light sensitivity was very bad. Going outside in the morning to get in the car was horrible. I had to keep my eyes shut very tightly, and then crack them ...

Continue Reading

Permalink | Posted: Apr 29, 2010 | Tags: PRK

PRK Laser Eye Surgery Part 3

PRK it is then

So I had decided that I really could go through with PRK laser eye surgery. That wasn't going to be a problem. I ended up doing the no interest financing even though we had enough money tucked away to pay for the surgery out right. (No reason to take money out of the high interest savings account now if I can pay over time).

I scheduled my surgery for 11 Nov 2009, which was a Thursday. I had been told that it's common for the first day after the surgery to be just fine, and then the next couple days to be quite bad. That first layer starts growing back, but doesn't disrupt vision until a little while after the surgery actually happens. The bad vision quality goes up and down as it grows back. After growing all the way back, it still ...

Continue Reading

Permalink | Posted: Apr 28, 2010 | Tags: PRK

PRK Laser Eye Surgery Part 2

Enough is Enough

In my search for Night & Day contacts, I found Standard Optical at the mall. The reason I went ahead and ordered contacts from them is because they had a trial pair that they were willing to part with even though I didn't get my exam done there. I ordered four boxes of contacts, and picked them up when they came in.

My trial pair of contacts was nothing but trouble. After wearing them for only a few hours, my eyes were so irritated that I couldn't stand it. The longest I could go was four hours. I had enough. I called standard optical to see if I could get store credit for my four unopened contact boxes. I could. They advertised Lasik. Free consultation, no interest financing, and sales were part of the pitch.

Seeing the Light

I asked about the Lasik consult, and they ...

Continue Reading

Permalink | Posted: Apr 27, 2010 | Tags: PRK

PRK Laser Eye Surgery Part 1

I got PRK laser eye surgery this past November. I wanted to blog about some of the technical things I did to cope with the recovery time, but it ended up turning into six parts about my vision, the motivation, the surgery, the recovery, and my results as well.


I got my first set of glasses in the third grade. I got contacts in seventh grade. Glasses break, contacts fall out. Soft contacts was a wonderful switch from glasses. Glasses don't correct peripheral vision, contacts do. My problem with contacts is that I'd never take them out. I also had some other fun experiences with my corrective eye gear.

One time when I was out of town, my right contact fell out. I was in an auditorium, and I had to wait for whatever I was there for to get over before getting on my hands and ...

Continue Reading

Permalink | Posted: Apr 26, 2010 | Tags: PRK

git command of the day: #10

git stash

This command throws all your working directory changes into a "stash", which can be later re-applied with the git stash apply command. This is nice when you're not ready to commit, but you need to get something else committed too. The example used in the documentation for this command is your big boss comes in and needs an emergency fix for something. Without git stash, the workflow to achieve the same result has more steps and can be more awkward.

So, I got up in the middle of programming working on a small, low priority project several months ago. I came back to it recently, and after reviewing what I had left, I decided I had merged something to my master branch that I didn't really want in place quite yet. I also had some changes in the working directory that hadn't been added to ...

Continue Reading

Permalink | 1 comment | Posted: Feb 03, 2010 | Tags: git

Smug Enhancements

Something I've had on my todo list for a very long time now was to get my notes from School published automatically on my website. They are already stored in ReStructured Text, and they are already stored in git repositories, so my use of smug already had me 95% of the way there. (I have a write-up about my note taking method: here)

I spent my day off, and finally found some better approaches to the problems I had, and I now have automatic sharing of my notes on my website.

The thing that was holding me back was the fact that smug couldn't do everything I wanted it to. I also store other things, such as homework, papers, and other assignments in the same git repository. Also, the way that I would organize a website is different than I would organize my personal files.

Here is an ...

Continue Reading

Permalink | 1 comment | Posted: Jun 13, 2009 | Tags: Django Open Source git Smug Python School Servers

Surpassing Mailing Limits

Bluehost enforces a maximum outgoing email per limit on their service. Most tasks, such as personal email, and mass mailings can easily be routed through other mail servers. As long as the process sending the mail does not reside on the server, then it's as simple as changing the settings to use another mail service.

If your application has to run on the server, such as a web application, forum, business contact tracker, or cms, then you are out of luck. There is no way to send email to an outside server from Bluehost. Port 25 is blocked, because that would be open season for spammers. Any sane shared hosting company would enforce the same policy. The only way to get an email out to the rest of the world is to use either the sendmail binary, or connect to port 25 on localhost to send a message.

There ...

Continue Reading

Permalink | Posted: Jun 10, 2009 | Tags: Bluehost Hosting email PHP SSH

Stumpy Burger

So, I've mostly kept to computers and programming on my blog, but I've decided that I'll blog about food, at least this once.

Stumpy Burger is a small Burger place that opened up about a week ago in Provo. I noticed its sign about a month and a half ago, but looking in the window revealed that it surely wasn't open yet.

I went to drop off my car for a long repair, and I pulled my bike out of the trunk. On the way home I decided to check to see if Stumpy Burger was open yet. It was, but I had to wait a little before they opened for the day.

When I went in, I was met by a friendly staff. I ordered a Cheezie Burger, which is basically a Stumpy Burger with cheese. I got pickles and grilled onions, which are both ...

Continue Reading

Permalink | Posted: Jun 05, 2009 | Tags: Virtualization Food Provo, Utah

Python for Unix and Linux System Administration

Python for Unix and Linux System Administration First Edition

This is an O'reilly book that focuses on using Python in a niche that has long been filled with shell scripting languages like bash, along with perl. Python's scripting capabilities are very nice. I like Python, and I'm a System Administrator.

The Introduction explains the authors' reasoning why Python is a good choice. They explain why Python can be a good choice. For the casual reader that may have picked up this book in a bookstore, this is a good thing. I've already been sold on Python, which is why I got the book in the first place.

The book's chapters each focus on a specific type of task that a System Administrator might need to do. Some chapters covered topics that I could have written about. They covered creating a few small Django apps in ...

Continue Reading

Permalink | Posted: Apr 17, 2009 | Tags: books reviews Python Administration

FastCGI for mod_userdir

So, I want to move away from mod_php for the obvious security reasons.

FastCGI is a good alternative. I want to make the transition as easy as possible for my users. The transition on my Bluehost account from the regular PHP handler to the fastcgi handler is quite easy. All I do is add AddHandler fcgid-script .php to my .htaccess. Here are the requirements that I am looking for in transitioning to fastcgi for php:

1) Easy Transition - little or no user intervention required. I'd prefer that no intervention is required. 2) fastcgi scripts should be run using suexec for security and potential tracking purposes. 3) No scripts should be run when adding/removing users from the system. I want this to "just work" with the mod_userdir setup that we have.

Ideally, this change could be made during scheduled maintenance, and everyone could be automatically using the new fastcgi ...

Continue Reading

Permalink | Posted: Mar 24, 2009 | Tags: Open Source Servers Hosting PHP FastCGI


I never thought that my personal blog would be useful to anyone except myself. I've not put a lot of effort into attracting traffic, but it's been trickling my way.

I never really finished the templates and CSS for, so I spent a little time here and there over the past few days and added some CSS, and updated the templates to make the blog experience a bit nicer.

I haven't added the template tags to turn on the calendar view in the sidebar, but I don't know how useful it would be anyway.

I really enjoy the Django templating language. I was able to add the gravitar functionality to the comment system without modifying the source of the blog app that I use. All I did was create an app that had the template tag snippet, and a template for rendering. To get ...

Continue Reading

Permalink | 6 comments | Posted: Mar 10, 2009 | Tags: Django Open Source