## Posts

### Vagrant up in the cloud (DigitalOcean)

It's quick and easy to start your virtual machine in the cloud if you use vagrant. Like, 55 seconds fast. I find it especially handy for toy projects that I need on the web quickly or when I don't want another virtual machine to gobble up resources on my laptop. I'm going through the steps for DigitalOcean. It's similarly easy for Amazon Web Services (AWS), but I find their web interface somewhat discombobulated. A word on pricing : if you use the cloud for a small project it's basically free. A full day on Digital Oceans costs 16 cents. That's (hopefully) less than you tip on a cup of coffee. There are a lot of online coupons that'll get you through the first few months. AWS offers a full year for free, see http://aws.amazon.com/free/ . I'm assuming that you have vagrant installed and a Vagrantfile already written or generated with  vagrant init . Ok, let's get started! First, download the vagrant plugin. vagrant plugin install vagrant-digital
Recent posts

### mod_rewrite vs CNAME changes

I thought I could be smart and redirect to a google sites project, instead of changing the CNAME entries. I had to learn that a mod_rewrite to a different url always does a visible redirect to the substituted url, so no faking that it's not a google site.

### PHP Opcodes

First, what is an Opcode? It's a compiled form of a PHP script, similar to Java bytecode. Or, more precisely, from php.net "When parsing PHP files, Zend Engine 2 generates a series of operation codes, commonly known as "opcodes", representing the function of the code." <?php $a = "Hello ";$b = "World\n"; echo $a .$b; For a script like this, the opcodes look like that: number of ops: 5 compiled vars: !0 = $a, !1 =$b line # * op fetch ext return operands --------------------------------------------------------------------------------- 2 0 > ASSIGN !0, 'Hello+' 3 1 ASSIGN !1, 'World%0A' 4 2 CONCAT ~2 !0, !1 3 ECHO ~2 5

### Math job search

Phil Grizzard's detailed description of his job application process. A Longtime Math Grad Student's Job Search Experience Totally worth reading if you're on the job market soon. Thanks for sharing!

### GitX and Finder in MacOs

GitX is a cool tool to visualize your git branches. It automatically assumes all files ending in .git files are git applications. When you browse files in Finder, anything ending in .git is now not a folder anymore, and clicking on it will launch GitX. Very annoying. I assumed I could just right click the file and set Open with to finder, but you can only change it to other applications, you can't tell your Mac that foo.git is a folder, not a git application. Instead, I edited the file /Applications/GitX.app/Contents/Info.plist (sudo!). Remove the following line inside CFBundleTypeExtensions <string>git</string> ... <key>CFBundleTypeExtensions</key>       <array>           <string>git</string>           <string></string>       </array> ... And then run /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -u -r -f /Applications/GitX.ap

Every time I get an email, Thunderbird shows a little pop-up on my screen, saying x new emails from xxx . Oftentimes, I have co-workers look at my screen, they don't need to know everytime I get an email that it's from Amazon, Zappos, Banana Republic, or Victoria's Secret. So, here's how you turn it off: Click Edit and select Preferences Click Advanced Select the General tab Click the Config Editor button Search for biff Set mail.biff.show_alert to false

### Book recommendation: A PhD Is Not Enough: A Guide To Survival In Science

I've recently read this small book, I devoured the 128 pages within two hours. Thought written in 1993, I think it is still highly accurate. Feibelman, a physicist,  describes several cases of unsuccessful scientific careers, despite hard work and intelligence. He points out the problems and gives advise how to avoid them. Every scientist should read his book early in grad school, refresh his memory when finishing grad school, and again when mentoring graduate students. A PhD is Not Enough on Amazon