'HEADLESS VIRTUAL BOX '

I like running VirtualBox headless on my Mac. It doesn’t show up in the Dock, and feels like it’s a remote server. First, figure out which VMs you have on your machine. haddad-work:~ jhaddad$ VBoxManage list vms Oracle VM VirtualBox Command Line Management Interface Version 3.2.6 (C) 2005-2010 Oracle Corporation All rights reserved. "WebServer" {2c61a180-e098-4926-b09a-27e431791c88} Then start it using VBoxHeadless nohup VBoxHeadless -s WebServer -vrdp on & I’m using Cord for RDP.

'RUNNING ERLANG CODE FROM THE COMMAND LINE '

This was really useful for me in scripting TextEdit to run my unit tests, as Erlide has been crashing every time I use it. erl -run mymodule myfunc -run init stop -noshell [http://www.trapexit.org/Running_Erlang_Code_From_The_Command_Line](Running Erlang Code From the Command Line)

WORKING WITH DOM IN PHP - LOOKING AT A PHP HTML PARSER

So, lets assume you’ve got a PHP project where you’re scraping pages and trying parse fields out of the DOM. Up till now, I’ve just used regular expressions because they’re easy. I avoided trying to parse html as xml using SimpleXML because there’s just to many cases where it would fail due to invalid tags. Well, I feel like an idiot. It turns out there’s a great extension built into PHP to do just that, and it’s the DOM extension.

PRINT ALL PUPPET CONFIG VARIABLES

For some reason, I haven’t found this anywhere in the docs. puppet –configprint all It’ll print all your puppet configuration variables.

VIRTUALBOX GUEST ADDITIONS - REDHAT / CENTOS

Mount VirtualBox Additions disk through the VirtualBox UI. yum install -y gcc kernel-devel-uname -r mkdir /mnt/cdrom mount -o ro -t iso9660 /dev/cdrom /mnt/cdrom sh /mnt/cdrom/VBoxLinuxAdditions-amd64.run Info found on tuxtraining.com

REMOVE FILE FROM GIT HISTORY

Useful stuff. git filter-branch -f –index-filter ‘git update-index –remove filename’ HEAD git push –force –verbose –dry-run git push –force Slight better version. Only rewrites history from the first commit the file existed. git filter-branch -f –index-filter ‘git update-index –remove filename’ <introduction-revision-sha1>..HEAD git push –force –verbose –dry-run git push –force Found on github.

PUPPET STAND ALONE - TEMPLATES, CONFIGS

I’m working on getting all our servers standardized with puppet to minimize installation and maintenance hassle. Pretty exciting. I’m setting all this up with puppet standalone. I don’t think we really gain anything by using the daemons, so it’s just a simple call to puppet site.pp -v And the changes are applied. I ran into a snag today trying to get templates working. I kept getting the below error when trying to update my test system:

MOUNT AFP SHARE OVER COMMAND LINE

PYTHON MODULE DOCS

I’ve been trying to get into Python in my spare time, since it’s got such a huge volume of modules and looks like it should be easy to be ripping it up in no time. But of course, I have my complaints. Fortunately I don’t need to write a long blog post, this guy did it for me. It’s kind of alarming this post is from 2 years ago and the docs are still a major problem.

MACBOOK AIR CONCLUSION

I made a post back in December regarding my MacBook Air and a battery life issue. About 2 weeks ago, I brought the Air back to the Apple store again, despite being completely shot down the first time. I had a 12:30 appointment, got there right at 12:30, but no one talked to me for a few minutes, so by the time I got someone’s attention, I was informed since I was late, they cancelled my appointment.