Tales of an IT Nobody

devbox:~$ iptables -A OUTPUT -j DROP

angular-ui-router – IE8 and nested states April 16, 2014

Just a quick tip, If you still have to maintain compatibility with IE8 (< AngularJS 1.3) – and you’re using angular-ui-router for nested views, the documentation for nesting states says you should use “<ui-view />” for your template for an abstract parent state:

Remember: Abstract states still need their own <ui-view/> for their children to plug into. So if you are using an abstract state just to prepend a url, set resolves/data, or run an onEnter/Exit function, then you’ll additionally need to set template: "<ui-view/>".


The problem is, IE8 doesn’t like “<ui-view />” – so instead, (I’d suggest this anyways), use:



2 Comments on angular-ui-router – IE8 and nested states

JQuery – Sparkline: Re-draw on resize / responsive sparklines August 8, 2012

I’ve been suckered in by the awesome JQuery Sparkline plugin – I won’t go over how it works or what it does, but rather a quick ‘fix’ for fixing issues with how the output deals with browser resizing. (Long story short, it doesn’t by default).

Here’s a visual of the issue I’m talking about with responsive/resizing layouts



After resize:


The fix:

Assign your Sparkline initialization to a variable as a function.

Then call the function to intialize, and bind it to JQuery’s $.resize() method.

I also used a short setTimeout() to avoid excessive redrawing during the resize operation.

And voila!


5 Comments on JQuery – Sparkline: Re-draw on resize / responsive sparklines
Categories: Design purdy

Migrating from Blogger (Google) to WordPress July 13, 2012

With the sketchy nature of Google, I’m starting to decrease as many dependencies as I can from them. Starting with my blog. A part of it is just a technical test to find out how hard it would be to wean off of the free service.

Overall, there’s few – if any alternatives to WordPress that will let you import your blog from Blogger with such success. There are a few caveats I feel are worth mentioning, however…

No Comments on Migrating from Blogger (Google) to WordPress

Why I won’t (can’t) adopt Google Chrome yet… January 10, 2012

Privacy aside, simply put: in my role, I do my fair share of design work, AJAX debugging, CSS, you name it –  I need tools at my fingertips to quickly do more than just rip apart the DOM of a page, these are my deal breaker extensions/capabilities that aren’t in chrome:


1. Web Developer Toolbar – Session toggle, disable/enable cache
Chrome has no way to turn on/off cache at the click of a button. The closest thing I have found is a to create an icon that has a switch in the launch parameters. Another biggie for me is to clear a specific set of session cookies for a domain instead of all of them. The chrome version of Web Developer Toolbar completely lacks these options.






 2. Selenium IDE
Only firefox has the Selenium IDE plugin; for those of us who perform automation or frequent checking on forms for SQL injection or other; there’s a few alternatives out there for chrome, but none as extensive as Selenium (you can also reuse the IDE tests for Selenium RC)




3. S3Fox (or equiv.)

4. View image info, without a darn plugin… (’nuff said; even IE has it!)

Google Chrome ISthe browser of the future;  it’s still not quite there yet for me…

No Comments on Why I won’t (can’t) adopt Google Chrome yet…
Categories: google purdy tools

System admin ‘helper’: Zebra stripe log / console output August 25, 2011

Looking at an ASCII data table can be difficult – so to start a small trip into Perl programming – I tossed together a simple Perl script, with no module requirements – zebra.pl as I call it, and it zebra stripes the output. It adds a nice touch to say vmstat or viewing something like the interrupts on a multicore box. It’s super simple and done in the nature of Aspersa. (Now a part of percona toolkit).

It doesn’t work 100% like I want – I would have liked it to take an $ARGV; to do that it seems like I’d have to create a dependency with a module (something like GetOpts) – so I decided one can simply modify the script to change how many X rows are striped.

You can fetch it here.

No Comments on System admin ‘helper’: Zebra stripe log / console output
Categories: linux purdy servers

PHPUnit and apache ant junitreport task May 13, 2011

There’s not a whole lot of ‘purdy’ interfaces for parsing junit results. For what little that’s out there – it’s even a bit more difficult when you consider the PHP camp looking for a parser for the output from the likes of PHPUnit

If you’re looking for an easy way out with a reasonable result on the unit test report – take a look at my quick and dirty conversion script.
Basically, the default output from PHPUnit’s –log-junit argument doesn’t jive 100% with ant’s junitreport task. This is due to the nested ‘testsuite’ elements in the results. All the script does is flatten those into several files, something the junitreport task expects.
Take a look, maybe it’ll help someone besides myself. 
Someday I may get around to writing a straight up php parser to deal with either the junit xml or the json output from phpunit… maybe…
No Comments on PHPUnit and apache ant junitreport task
Categories: ant php programming purdy

libflashplayer.so – quickie for install. April 11, 2011

Need a place to put it on debian/ubuntu?


Chrome: (You might have to create the ‘plugins’ dir – I did =\ )


Restart all instances of the browser/s and check it out.

PS: Flash on 64-bit linux doesn’t matter, you can put it in lib64/ if you -REALLY- want..

No Comments on libflashplayer.so – quickie for install.
Categories: linux purdy

Browser wars: Feels old school March 3, 2011

Stepping back from your browser of choice; it just hit me how HTML5 has reignited the browser war, pushing innovation and making things feel old school again.

There’s nothing ‘old school’ about HTML5, or is there? Anyone remember the old dx filters in IE? rotate, flame text, etc – now it’s all about standards, but HTML will no longer have a ‘version’ number. To be frank, this scares me – I think it will end up harming innovation. Certain majority players see fit to implement what they want. Without a marketing slogan to drive for – I smell another recession of lame-duck browsers.

What IS old school is a familiar aura with each contender putting up an HTML5 demo page to show what it’s got (details start with this slashdot post.) to me this has a good, old-fashioned competitive feel that I think will decline like a hot rock once the initial “HTML5” support buzz has passed. I hope I’m wrong.

No Comments on Browser wars: Feels old school
Categories: linkspam marketing purdy

Command line musings: whiptail and dialog March 15, 2010

A quick jaunt on cool command utils for ‘command line ui’ installations/prompts for those who are into that kind of stuff for configuration tools, etc;

Whiptail is a handy utility that allows you to create colorized command line dialogs that you see when configuring certain things such as postfix or zend server, etc.

For scripts that utilize this, it’s important to note the latter part of the man page. Yes/OK returns 0; No/Cancel returns 1. For internal errors/malformed command, whiptail returns -1.

Sample output:

 * Note: The “10 30” is height, and width represented in cols and rows not pixels.
Sample command:
whiptail –yesno –title “Question for you” “This is cool, no?” 10 30

Dialog is a more powerful counterpart than whiptail, much more verbose in it’s usage providing flexability.

Sample output:

Sample command:
dialog –title “Dialog title” –checklist “Instructions for dialog”, 15 60 2 \
optionA “Description for A goes here” valA \

optionB “Description for B goes here” valB

Make sure you read the man pages on the return codes for use in your various shell scripts, etc.

No Comments on Command line musings: whiptail and dialog
Categories: linux purdy

Bullet train crash course for CSS October 5, 2009

One of the best zero-to-hero articles I’ve ever seen starting with basic CSS moving all the way to sprites; worth a look:


No Comments on Bullet train crash course for CSS
Categories: CSS Design purdy

Visualizing changeset activity August 13, 2009

Came across a nifty extension for mercurial that uses google charts to generate graphs revolving around your Hg repository activity. The extension is called ChartExtension – it’s not as configurable as I had hoped but the results are pretty easy to obtain:

(click for larger)

No Comments on Visualizing changeset activity
Categories: hg purdy

Tapping flickr, Part 1 April 13, 2009

This first quickie will be on iterating through the photos in a photoset (essentially, an album) and pitting them out in a thumbnail format with links to the larger versions.


PHP with SimpleXML
Flickr Account, and a developer API key.

This will spit out a nice dump of what you have to work with.
We’re mainly concerned with making sense out of the $oXML->photoset values.

Using from what we know off of the references we can generate thumbnails easily:

I hope this sparks some ideas – and Part 2 will involve some more detail oriented things.

No Comments on Tapping flickr, Part 1
Categories: php purdy