UIS PHP53, DOM PARSING, PHPUNIT, PUPPET CONFIG SOLUTION

I’m using PHP53 package from the IUS Community repository. I’ve been trying to get phpunit to install, but it gives an error that it needs DOM install. It took me a little bit to figure this out, but I finally got it working. What you need is the php53-xml package. You can install it using yum install php53-xml or if you’re using puppet package { ["php53-xml"]: ensure...

DEBUGGING WITH ERLANG

First, make sure you have the compile flag (+debug_info) set when compiling your source, then fire up the debugger: 1> i:im(). My Erlang Makefile: EBIN_DIR := ebin SRC_DIR := src EXAMPLES_DIR := examples INCLUDE_DIR := include ERLC := erlc ERLC_FLAGS := +debug_info +native -W -I $(INCLUDE_DIR) -o $(EBIN_DIR) all: @mkdir -p $(EBIN_DIR) $(ERLC) $(ERLC_FLAGS) $(SRC_DIR)/*.erl clean: @rm -rf...

'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"...

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

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

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

MOUNT AFP SHARE OVER COMMAND LINE