Archive for the ‘Development’ Category

Just needing to get this down quickly and succinctly…

The Raspberry Pi is super-fun for me as it’s a full OS (Linux, which I really like a lot) with Pins!  Current project: make a (private) website that will let me open/close and check my garage door.  Maybe more on this later.

SUPER frustrating is the inability for a web-server to control the GPIO pins on my Raspberry Pi because the web-server is not running as root.  Really?!? (more…)


I want to setup a remote repository in my git project so that whenever I push to the ‘real’ remote repository that I cloned from, I also push to a second repo – a (literally) backup repository.  Further, I want the ability to push to this backup repository whenever I wish – perhaps on every commit.  I tend to commit often, make throw-away branches, etc.  I don’t like having much that is not backed up at any point in time (ex. Time Machine on my work Mac)

End goal: I want a backup/off-site, ‘ghost’ repo that I can push to frequently in case I do something horrid to one of the operating systems on my laptop and render unreadable the partition that contains all my work (not that such an occurrence would happen… at least not again this month!). (more…)


I need to break a paragraph into lines that are no longer than 60 characters for a particular, text-only email template.  I want the lines to break at/on spaces (because just breaking at the 60th character would probably cut words in half, randomly… not very professional!). (more…)

All I want is to convert a super-simple SimpleXML object to an array.  “super-simple” means no attributes, etc.  Nothing that is XML-specific.

$xml_string = "
        <sub_first_thing_a>Hi, I am the content of the first thing.</sub_first_thing_a>
        <sub_first_thing_b>Hi, more content.</sub_first_thing_b>
    <second_thing>Notice, no attributes or anything fancy.</second_thing>
$simplexml_object = simplexml_load_string($xml_string);


Why?  Because a number of functions, libraries, etc. return SimpleXML objects.  For example, the 1.x version of the very-awesome AWS PHP SDK tends to return SimpleXML objects.  And 9 times out of 10 all I need is a multi-dimensional, usually keyed (associative) array. (more…)


Developed this really slick, internal website where I use a ton of AJAX calls to constantly load next-steps into the browser.  I’m using this as a way to make the screen much easier to use — instead of a large number of form-fields to fill out, the user is only given what is needed right-now, then, given what’s needed next in a contextually relevant way (thereby not even having/displaying fields that are irrelevant to the circumstance).

And then I tried it all in IE.  Ugh.  Finally got it to work (CSS hacks and all), only to have formatted text have its tags stripped.  Instead of having a heading-line followed by an unordered list, I got plain text.  PLAIN text.  Grrr. (more…)