Intel HDA/Realtek ALC800 surround sound in linux

actually just posting this so I’ll google it in the future and will get to this page. for some reason sound only comes out of the front speakers and is impossible to route to any others. adding this model parameter makes it happen.


options snd-hda-intel model=6stack

rinse and repeat, I mean, reboot

ten what?

A man goes in to see his doctor, and after some tests, the doctor says, “I’m sorry, but you have a fatal disease.”

Man: “That’s terrible! How long have I got?”

Doctor: “Ten.”

Man: “Ten? What kind of answer is that? Ten months? Ten years? Ten what?”

The doctor looks at his watch. “Nine.”

mysqli prepared statements

one way to make sure that sql injections NEVER happen is to use a prepared statement

perl has been doing it for ages, so by now it should be mainstream, yeah? I wish. but if you’re behind the curve, no worries, here’s how to do it. this is for a simple contact form.

  • use a question mark for every time you want to use a variable
  • for bind_param, the “sss” means I am going to be substituting 3 strings for the question marks. if I said “sis” that would mean I have one string, then an integer, then a string

another great reason to upgrade from IE6 to IE8 today – feed the world

still using Internet Explorer 6? why? I could go on and on about specifically why you should upgrade from an almost 10 year old piece of software, but I’ll keep it simple.

web programmers have to develop with all users in mind (well, they should). but, developers shouldn’t be wasting time trying to ensure that their feature-rich website has backwards-compatibility with archaic software such as IE6.

IE6 is a detriment to progress in web-based technologies, and degrades the overall user experience.

SO: the point of this post!

please visit

this website will donate 8 meals to Feeding America for each upgrade to IE8 through September 30th. it’s FREEand I promise you, it’s the same internet…just better.

ternary operator in PHP

writing if statements like this is tiring, and wastes lines 🙁

try this:

parse an XML file with PHP

I always hated having to manually parse out an XML file back in the day. but now, as of not really that recently, you can use SimpleXML to automatically convert an XML file to an array-like structure of objects. you do have PHP5, and the php-xml package, right?

amazing, eh? the LIBXML_NOCDATA keeps all CDATA enclosed data from disappearing on import.

away in a pointer

Away in a pointer, the bits in a row.
A little dereference to see where they go.
I look down upon thee, and what do I see?
A segfault and core dump, right there just for me.

I saw thy init there, a reaping away
My process, from its address space, so sorry to say.
I thought I had saved thee, from void pointers all,
But maybe I missed one, and doomed you to fall.

Be near me, debugger, I ask thee to stay
Close by my terminal, and help me, I pray;
To find all the bugs and the void pointers too,
And if my kernel oopses, help me reboot for you.