<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I’m an IT nerd, I use this site to share discoveries and code snippets for the world and myself.  From time to time I also find hilarious things online that will also be posted.

Enjoy.</description><title>public var blog:Object = {name:"chad's musings"};</title><generator>Tumblr (3.0; @chadillac)</generator><link>http://chad.ill.ac/</link><item><title>12.04 - Ubuntu/Linux Audio Skipping/Stuttering</title><description>&lt;p&gt;I recently built a new machine for work and was having a lot of issues with audio (on linux, what a shock ;)). I&amp;#8217;d read up on some different fixes and none of them seemed to fix the issues I was having with my system.  After about a week of woes and a lack of music I decided to open up the box and swap the audio cable from HD to AC97 just to see if it might fix the issue.  Low and behold audio plays fine without issue using the older standard.  I don&amp;#8217;t reap the benefits of HD audio, but not being an audiophile and working with middle of the road headphones I can&amp;#8217;t tell a difference anyways.&lt;/p&gt;
&lt;p&gt;So just a heads up, if software can&amp;#8217;t fix your skipping audio, maybe give your hardware a try.&lt;/p&gt;</description><link>http://chad.ill.ac/post/22589427042</link><guid>http://chad.ill.ac/post/22589427042</guid><pubDate>Mon, 07 May 2012 11:23:00 -0400</pubDate><category>linux</category><category>audio</category><category>ubuntu</category><category>HD audio</category><category>AC97</category><category>skipping</category><category>stuttering</category><category>fix</category><category>solution</category></item><item><title>Linux simple h264 batch conversion</title><description>&lt;p&gt;You&amp;#8217;ll need HandBrakeCLI (&lt;a href="http://handbrake.fr/downloads2.php" target="_blank"&gt;http://handbrake.fr/downloads2.php&lt;/a&gt;) and a terminal.  To convert a video (the easiest way possible, thanks to HandBrake mind you, ffmpeg was giving me a lot of issues) is really simple, but depending on your machine, the quality, the size, etc. it can take a good bit of resources and a good bit of time to complete one of these encodings.  If you&amp;#8217;re not keen to sitting around watching progress counters and ETAs there will surely be down time between encoding tasks as you&amp;#8217;ll have to manually keep an eye on them.  Using some common *nix tools we can make this automated and easy to use.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Basic HandBrakeCLI encoding:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;HandBrakeCLI -Z Universal -i infile.avi -o outfile.mp4&lt;/pre&gt;
&lt;p&gt;The above will take a standard avi format video and convert it to an h264 format video, simple.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Batch Conversion:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;ls *.avi | awk '{print "HandBrakeCLI -Z Universal -i \x22"$0"\x22 -o \x22"$0".mp4\x22"}' | sh&lt;/pre&gt;
&lt;p&gt;The above will (assuming you&amp;#8217;re in a directory with several .avi files) will go over each file, build the appropriate conversion command for HandBrakeCLI and then pipe that into sh to execute the command.  I&amp;#8217;ve been doing mass conversions for web streaming purposes using this technique, so far I&amp;#8217;ve converted over 600 individual videos and still going strong.&lt;/p&gt;</description><link>http://chad.ill.ac/post/21398684009</link><guid>http://chad.ill.ac/post/21398684009</guid><pubDate>Thu, 19 Apr 2012 17:42:00 -0400</pubDate><category>linux</category><category>handbrake</category><category>video conversion</category><category>batch</category><category>h264</category><category>easy conversion</category><category>easy</category></item><item><title>“If you can get Nyan Cat into the servers MOTD...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_m1ts3bgbk91qz6ydvo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;“If you can get Nyan Cat into the servers MOTD you’re more than welcome to do so…”&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CHALLENGE ACCEPTED&lt;/strong&gt;&lt;/p&gt;</description><link>http://chad.ill.ac/post/20318685552</link><guid>http://chad.ill.ac/post/20318685552</guid><pubDate>Sun, 01 Apr 2012 20:01:59 -0400</pubDate></item><item><title>Booting OS X with Grub2</title><description>&lt;p&gt;I installed Ubuntu on a Mac Mini at work and needed to get back into OS X for some testing.  The default configured Grub entries wouldn&amp;#8217;t load for OS X (hd0, part0).  After looking over the net and digging through lines and lines of Grub conf I found a little blurb from another user saying they&amp;#8217;d tried this and it worked&amp;#8230; so if you&amp;#8217;re beating yourself up over OS X and Grub2 give this a try and see if it works&amp;#8230; it did for me.&lt;/p&gt;
&lt;p&gt;open up your Grub2 conf file, which in Ubuntu is located at&lt;/p&gt;
&lt;pre&gt;/boot/grub/grub.cfg&lt;/pre&gt;
&lt;p&gt;Then at the bottom of the menu entries I added:&lt;/p&gt;
&lt;pre&gt;menuentry "Mac OS X (Custom/Bootable)" --class osx --class darwin --class os {
        set root=(hd0,0)
        exit
}&lt;/pre&gt;
&lt;p&gt;This entry gets me booted into rEFIt at which point I can properly boot into OS X Lion without issues.  From this point forward the machine will default into rEFIt until you choose to boot into Linux again&amp;#8230; which will push you back into Grub2 for future boots.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8220;If it&amp;#8217;s stupid but it works, it isn&amp;#8217;t stupid.&amp;#8221;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Note: I&amp;#8217;d already installed and had rEFIt running from the previous Ubuntu install&lt;/p&gt;</description><link>http://chad.ill.ac/post/17627797744</link><guid>http://chad.ill.ac/post/17627797744</guid><pubDate>Tue, 14 Feb 2012 18:42:46 -0500</pubDate></item><item><title>Bash'isms (SVN+Awk+Grep+Cut+Bash one liners)</title><description>&lt;p&gt;A couple bash 1 liners I threw together recently that I&amp;#8217;ve found to come in very handy so I thought I&amp;#8217;d share.&lt;/p&gt;
&lt;p&gt;The back story is simple, yearly reviews, talk about what you&amp;#8217;ve done, yadda yadda yadda.  Well, I don&amp;#8217;t remember honestly. I&amp;#8217;ve done A LOT.  That&amp;#8217;s not going to fly in a serious meeting with &lt;a href="http://www.youtube.com/watch?v=2SoWNMNKNeM" target="_blank"&gt;&amp;#8220;The Bobs&amp;#8221;&lt;/a&gt;.  So I needed a way to look over my years work, as a refresher of little and big projects alike.  No problem SVN to the rescue&amp;#8230; but our SVN has a lot of developers, and several commits per day of new features, bug fixes, tweaks, etc. After consulting the SVN docs I was pretty shocked to find no way to pull logs based on the user submitting said changes&amp;#8230; one would expect something along the lines of:&lt;/p&gt;
&lt;pre&gt;svn log -uchad&lt;/pre&gt;
&lt;p&gt;And one would be wrong in assuming such a feature exists.  Some Google time turned up convoluted and down right ugly solutions.  I decided to have a go at it with my bash-fu&amp;#8230; for practice and profit.  Below is an easy way using a couple common *nix tools to get the info you want fast and easy. In the following examples data you&amp;#8217;ll need to replace will be wrapped in %&amp;#8217;s with example data in []&amp;#8217;s (e.g. %username[chad]%)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Get all svn commits for a given username:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;svn log | grep '| %username[chad]%' | cut -d' ' -f1 | awk '{print "svn log -"$1}' | bash &lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Get all svn commits for a given username in a year/month/day:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;svn log | grep %date[YYYY-MM-DD]% | grep '| %username[chad]%' | cut -d' ' -f1 | awk '{print "svn log -"$1}' | bash &lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Get all modified files for a users commited for a day/week/etc.:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;svn log | grep %date[YYYY-MM-DD]% | grep '| %username%' | cut -d' ' -f1 | awk '{print "svn log -v -"$1}' | bash | grep %files['/trunk']%&lt;/pre&gt;</description><link>http://chad.ill.ac/post/14286989688</link><guid>http://chad.ill.ac/post/14286989688</guid><pubDate>Thu, 15 Dec 2011 20:15:00 -0500</pubDate></item><item><title>GrooveShark App (kind of) [Linux, Chrome]</title><description>&lt;p&gt;I love GrooveShark, I love them so much that I looked for a stand alone app without much luck.  I usually just ran it in a background Chrome instance but I just wanted to be able to click a button and have all my Groovy goodness without tabs, or address bars, etc.&lt;/p&gt;
&lt;p&gt;It took about 10 minutes, but here it is, super simple.&lt;/p&gt;
&lt;p&gt;Step 1: Install Google Chrome &lt;/p&gt;
&lt;p&gt;(&lt;a href="http://www.google.com/chrome/" target="_blank"&gt;&lt;a href="http://www.google.com/chrome/" target="_blank"&gt;http://www.google.com/chrome/&lt;/a&gt;&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Step 2: Setup launcher with the &lt;strong&gt;-app&lt;/strong&gt; flag&lt;/p&gt;
&lt;pre&gt;    /path/to/google-chrome -app=http://grooveshark.com&lt;/pre&gt;
&lt;pre&gt;    example:
    /opt/google/chrome/google-chrome -app=http://grooveshark.com
&lt;/pre&gt;
&lt;p&gt;This flag will cause Chrome to launch without common browser elements like the address bar, buttons, bars, etc.&lt;/p&gt;
&lt;p&gt;Optional Steps: (for great justice)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bit.ly/pJN8R5" target="_blank"&gt;Pick an icon for your launcher&lt;/a&gt;&lt;/p&gt;</description><link>http://chad.ill.ac/post/7815607929</link><guid>http://chad.ill.ac/post/7815607929</guid><pubDate>Tue, 19 Jul 2011 17:00:00 -0400</pubDate></item><item><title>Nexus S + MIUI + Netflix = Working</title><description>&lt;p&gt;You&amp;#8217;ll need root, and you&amp;#8217;ll need a 2.3+ ROM installed.&lt;/p&gt;
&lt;p&gt;In&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/system/build.prop&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You&amp;#8217;ll have to edit the lines.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ro.product.model=[model_name_here]&lt;/p&gt;
&lt;p&gt;&amp;#8230;&lt;/p&gt;
&lt;p&gt;ro.product.manufacturer=unknow&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ro.product.model=Nexus S&lt;/p&gt;
&lt;p&gt;&amp;#8230;&lt;/p&gt;
&lt;p&gt;ro.product.manufacturer=samsung&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Reboot the phone and install the Netflix app from the market or&lt;a href="http://www.multiupload.com/NPZ062QIZB" target="_blank"&gt; install the .apk manually&lt;/a&gt; from your sdcard.&lt;/p&gt;
&lt;p&gt;For navigating to / and editing build.prop I suggest using &lt;a href="https://market.android.com/details?id=com.estrongs.android.pop" target="_blank"&gt;ES File Explorer&lt;/a&gt; as it supports root, navigating to /system/ and writing to the file all in a single app.&lt;/p&gt;
&lt;p&gt;Note: For safety sake you might want to copy an unedited version of build.prop to your sdcard (/mnt/sdcard/) for safe keeping should you need to revert back to the old file easily.&lt;/p&gt;
&lt;p&gt;Protip: If you&amp;#8217;re running a rooted device with a 2.3 ROM using these flags on your phone will make the Netflix app usable.&lt;/p&gt;</description><link>http://chad.ill.ac/post/5485756734</link><guid>http://chad.ill.ac/post/5485756734</guid><pubDate>Sat, 14 May 2011 13:48:00 -0400</pubDate></item><item><title>Ubuntu / Debian : List software from repository</title><description>&lt;p&gt;This will list packages coming from a specific repository&lt;/p&gt;
&lt;pre&gt;grep &amp;lt;repository_name&amp;gt; /var/lib/apt/lists/* | grep tar | cut -d' ' -f4 | sort -u
&lt;/pre&gt;
&lt;p&gt;Example&lt;/p&gt;
&lt;pre&gt;$ grep backbox /var/lib/apt/lists/* | grep tar | cut -d' ' -f4 | sort -u&lt;/pre&gt;
&lt;pre&gt;aircrack-ng_1.1-1backbox1.debian.tar.gz
autotools-dev_20100122.1backbox1.tar.gz
backbox-about_1.2.tar.gz
backbox-artwork_1.6.tar.gz
...
&lt;/pre&gt;</description><link>http://chad.ill.ac/post/4820221551</link><guid>http://chad.ill.ac/post/4820221551</guid><pubDate>Thu, 21 Apr 2011 20:10:01 -0400</pubDate></item><item><title>Redirect user, hide referrer</title><description>&lt;p&gt;Found a nice little way to trick browsers into redirecting users without passing a long associated referrer information.  Works in Chrome, IE6/7/8, and Firefox&amp;#8230; sneaky sneaky sneaky.&lt;/p&gt;
&lt;p&gt;For more info drop me a message in the comments.&lt;/p&gt;</description><link>http://chad.ill.ac/post/3371938513</link><guid>http://chad.ill.ac/post/3371938513</guid><pubDate>Fri, 18 Feb 2011 20:02:33 -0500</pubDate><category>javascript</category><category>referrer</category><category>headers</category><category>clear</category><category>delete</category><category>remove</category><category>php</category></item><item><title>VTech Pre-Computer Power Pad ... I love thee.</title><description>&lt;p&gt;&lt;span&gt;&lt;img align="middle" src="http://29.media.tumblr.com/tumblr_lo873gu1I01qz6ydvo1_500.jpg" alt="VTech" width="400"/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;My little cousins pulled out my VTech PreComputer Power Pad (the laptop looking version) while I was home this holiday at my Grandmothers house. I hadn&amp;#8217;t seen the thing in years and was so happy to see it still around. I waited for them to get tired of it and sat down at the kitchen table to give it a go. It had been years and I recall one application but I couldn&amp;#8217;t remember the name. It was the only one that would let you type and type and type, almost like a word processor, but you couldn&amp;#8217;t save anything.&lt;/p&gt;
&lt;p&gt;I always loved computers as a kid and when I was given this vtech I was a little disappointed. It was 1994, going on 1995 (christmas gift) and Windows 95 was coming out. My friends were playing solitaire, my uncle had a Mac PowerPC with full paint application and screen savers&amp;#8230; and I was given a VTech. It played crossword puzzles, and math games, some basic trivia. Basically my 11 year old self saw it as a toy, capable of nothing more than making me a better student, but never teaching me about computers like I wanted to learn about them. I would go and hang out at office depot and circuit city just so I could play with the real laptops of the time with their spring loaded roller ball mouses, and tiny screens.&lt;/p&gt;
&lt;p&gt;I recall hating mine, it was pointless&amp;#8230; useless! I would still play on it, pretending to be a troubled lawyer, or possibly some form of hacker. I recall one day opening that &amp;#8220;one word processor application&amp;#8221; and typing gibberish in while pretending to be stealing top secret government files. When I pressed enter on the keyboard the screen lit up&amp;#8230; it was lines and lines and lines of gibberish back, x&amp;#8217;s, 0&amp;#8217;s, #&amp;#8217;s, and I was sure I had broken the thing, pulling the plug and restarting it fixed it right up, and I could never figure out what I had typed.&lt;/p&gt;
&lt;p&gt;So now, 2011 is here, it&amp;#8217;s been nearly 14 years since I was given my first VTech from my grandma and I sit down at her kitchen table to play with my old &amp;#8220;toy&amp;#8221; laptop that was &amp;#8220;useless&amp;#8221; for all those years. Something is different this time, I&amp;#8217;m telling my little cousins that there is an application on here and you can just type whatever you want&amp;#8230; it was the one I used the most as a kid. Then I realize it and a huge smile comes across my face. I look down at the buttons (applications) that you can press and I see one, almost in disbelief, it reads &amp;#8220;BASIC&amp;#8221;.&lt;/p&gt;
&lt;p&gt;At this point I&amp;#8217;m in disbelief, I press the button and sure enough the screen reads &amp;#8220;BASIC HAVE FUN!&amp;#8221;. This was IT, this was that application&amp;#8230; and what&amp;#8217;s even cooler, is now I&amp;#8217;ve been working full time as a programmer since I was 20&amp;#8230; and now I know what BASIC is! I immediately realize that this &amp;#8220;useless&amp;#8221; toy is far more powerful than I had ever realized as a kid! I sat there at that little laptop on a tiny screen only capable of displaying a handful of characters at time taking requests from my cousins and writing them little applications, there was a birth date calculator, a weight on mars calculator, a square footage calculator, I made special messages appear when they entered correct words when we played 21 questions.&lt;/p&gt;
&lt;p&gt;That little VTech sparked my inner child again, and I&amp;#8217;m still floored that I was given (and wasted) such a valuable tool as a child, I hope that I sparked the same interest in my cousins that day and they&amp;#8217;ll spend as many hours playing with that little VTech as I did&amp;#8230; but hopefully they&amp;#8217;ll be able to grok BASIC and get a real head start on the &amp;#8220;other kids&amp;#8221; with their fancy WIndows 7 and OS X.&lt;/p&gt;
&lt;p&gt;And that&amp;#8217;s how I learned that I achieved my first buffer overflow at the age of 11&amp;#8230; on accident.&lt;/p&gt;

&lt;p&gt;&lt;img width="400" src="http://media.tumblr.com/tumblr_lop36wa4bE1qz6ydv.jpg"/&gt;&lt;/p&gt;</description><link>http://chad.ill.ac/post/2600712549</link><guid>http://chad.ill.ac/post/2600712549</guid><pubDate>Tue, 04 Jan 2011 17:53:00 -0500</pubDate></item><item><title>Chrome Extension : Screenshots made sexy</title><description>&lt;p&gt; After browsing the Google Chrome extensions catalog I found this little gem.  If you&amp;#8217;re in the business of taking screenshots of web pages (developer, designer, sharing funny stuff online, etc.) I highly recommend giving the &amp;#8220;Awesome Screenshot&amp;#8221; extension an install!.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l60w8i8Ayu1qz6ydv.png"/&gt;&lt;/p&gt;
&lt;p&gt;download it here (&lt;a href="https://chrome.google.com/extensions/detail/alelhddbbhepgpmgidjdcjakblofbmce" target="_blank"&gt;&lt;a href="https://chrome.google.com/extensions/detail/alelhddbbhepgpmgidjdcjakblofbmce" target="_blank"&gt;https://chrome.google.com/extensions/detail/alelhddbbhepgpmgidjdcjakblofbmce&lt;/a&gt;&lt;/a&gt;)&lt;/p&gt;</description><link>http://chad.ill.ac/post/850459053</link><guid>http://chad.ill.ac/post/850459053</guid><pubDate>Fri, 23 Jul 2010 14:21:20 -0400</pubDate><category>Chrome</category><category>Extensions</category><category>Screenshot</category><category>Awesome Screenshot</category></item><item><title>Virtualbox &amp; Windows 7 : Shared Folders</title><description>&lt;p&gt;I&amp;#8217;ve just recently installed Virtualbox on my Ubuntu machine and decided to set up a Windows 7 VM.  Once everything was complete it was time to enable shared folders so I could transfer some files to and from the VM.  Only 1 problem&amp;#8230; I can&amp;#8217;t find them?!&lt;/p&gt;
&lt;p&gt;After a bit of looking around on the web I finally found a random user comment on a random blog that hinted at where they &amp;#8220;might&amp;#8221; be so I decided to put this article up for any future VB + Win7 users that are just as confused as I was.  Some people were suggesting installing FTP servers to the Windows install and even using Web services like Dropbox to move the files from the host machine to the VM. :/&lt;/p&gt;
&lt;p&gt;First things first&amp;#8230; create your folder on your system.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;mkdir ~/VMShare&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Add said folder to your VB shared folders list.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l60t68ErDq1qz6ydv.png"/&gt;&lt;/p&gt;
&lt;p&gt;Once that is done you&amp;#8217;ll open up your Win7 Network view.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Start &amp;gt; Computer &amp;gt; Network (in the left window pane)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l60t90zoVE1qz6ydv.png"/&gt;&lt;/p&gt;
&lt;p&gt;And clicking on &lt;strong&gt;VBOXSVR&lt;/strong&gt; will list your shared folders.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l60t9bNawb1qz6ydv.png"/&gt;&lt;/p&gt;
&lt;p&gt;Now you&amp;#8217;re sharing files easily.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note: You&amp;#8217;ll need to have the Virtualbox Guest Additions package installed in the VM for this to work properly.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://chad.ill.ac/post/850244244</link><guid>http://chad.ill.ac/post/850244244</guid><pubDate>Fri, 23 Jul 2010 13:15:00 -0400</pubDate><category>Virtualbox</category><category>Windows 7</category><category>Shared Folders</category><category>Sharing Files</category><category>Linux</category><category>How To</category></item><item><title>Ubuntu 10.04 Netbook Remix : Disable UNR Launcher</title><description>&lt;p&gt;I installed UNR in version 9.10 and immediately disabled the netbook launcher for the classic desktop.  This was easy in 9.10 thanks to a setting in the system preferences called &amp;#8220;Desktop Mode Switcher&amp;#8221;.  It was great, it was easy&amp;#8230; and now it&amp;#8217;s gone.&lt;/p&gt;
&lt;p&gt;For whatever reason in 10.04 they decided to get rid of this handy little tool.  I had to purge some nautilus config files and all of a sudden, I was back to UNR launcher.  I couldn&amp;#8217;t find my trusty switcher so I started looking around the web&amp;#8230; people are going through 5-12 steps to get around this thing, many without full success.  I&amp;#8217;m writing this in the hopes that _YOU_ the person reading this finds it before you go through 12 steps of tweaking config files. &lt;/p&gt;
&lt;p&gt;Step 1: Remove the netbook-launcher&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo aptitude remove netbook-launcher&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Step 2: Install regular ubuntu-desktop&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo aptitude install ubuntu-desktop&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Step 3: Restart Gnome&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo service gdm restart&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Step 4: Login using Gnome as your session&lt;/p&gt;
&lt;p&gt;Done and done&amp;#8230; hope this saves someone from a headache.&lt;/p&gt;</description><link>http://chad.ill.ac/post/839778138</link><guid>http://chad.ill.ac/post/839778138</guid><pubDate>Wed, 21 Jul 2010 03:00:00 -0400</pubDate></item><item><title>Quickly search your bash history using arrow keys</title><description>&lt;p&gt;Add these lines to your /etc/inputrc to enable the functionality.&lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;"\e[A": history-search-backward
"\e[B": h&lt;/code&gt;&lt;span&gt;istory-search-forward&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Thanks Reddit and Archwiki!&lt;br/&gt; (&lt;a href="http://wiki.archlinux.org/index.php/Bash" target="_blank"&gt;http://wiki.archlinux.org/index.php/Bash&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;p.s. this functionality is included in your inputrc file by default on Ubuntu 10.4 and can be used by uncommenting the lines (41 &amp;amp; 42), but rather than arrows it uses Page Up and Page Down.&lt;/p&gt;</description><link>http://chad.ill.ac/post/813690161</link><guid>http://chad.ill.ac/post/813690161</guid><pubDate>Thu, 15 Jul 2010 00:13:00 -0400</pubDate></item><item><title>9.10 + Google Chrome + Netbook = YES!</title><description>&lt;p&gt;If you haven&amp;#8217;t tried Google Chrome on *nix yet I highly recommend it.&lt;/p&gt;</description><link>http://chad.ill.ac/post/396232533</link><guid>http://chad.ill.ac/post/396232533</guid><pubDate>Thu, 18 Feb 2010 02:27:10 -0500</pubDate></item><item><title>str_replace &amp; Fatal error: Only variables can be passed by reference</title><description>&lt;p&gt;&lt;strong&gt;UPDATE 4/3/2012:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A commenter pointed out that str_replace wasn&amp;#8217;t properly limiting replacements via the count param.  After looking around it seems that $count no longer limits replacements (I&amp;#8217;m honestly wondering if it ever did&amp;#8230;) and rather returns a number of replacements performed.  For any users experiencing this I&amp;#8217;d recommend using &lt;strong&gt;preg_replace&lt;/strong&gt; as it effectively supports limiting replacements.&lt;/p&gt;
&lt;pre&gt;preg_replace('/findit/i','replaceit',$haystack,1);&lt;/pre&gt;
&lt;p&gt;I could have sworn this func worked using the $count as a limit in the past&amp;#8230;&lt;/p&gt;
&lt;hr&gt;&lt;p&gt;If you&amp;#8217;re using a simple str_replace() call in PHP and getting a strange Fatal error that doesn&amp;#8217;t make a whole lot of sense to you I have a hunch as to why.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fatal example:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;$file_name = str_replace('findit', 'replaceit', $haystack, 1);&lt;/pre&gt;
&lt;p&gt;In PHP 5.0.5 some changes were made to how PHP handles variables, functions, and references.  This broke a lot of older code but also introduced some vague and questionable fatal errors.  They meant well by doing this by essentially requiring parameters be passed via reference.  I&amp;#8217;m assuming this was to prevent PHP from copying large pieces of data to work on them and thus helping memory performance overall. Luckily there is a simple fix, just declare your variable to be passed inline.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Working example:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;$file_name = str_replace('findit', 'replaceit', $haystack, $count = 1);&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Note: if you&amp;#8217;re working with a large data set in a loop I would highly recommend setting the reference outside of the loop and avoid this inline method.&lt;/em&gt;&lt;/p&gt;</description><link>http://chad.ill.ac/post/378645754</link><guid>http://chad.ill.ac/post/378645754</guid><pubDate>Mon, 08 Feb 2010 16:23:00 -0500</pubDate></item><item><title>An effective JavaScript &amp; CSS cache busting technique</title><description>&lt;p&gt;Client side cache is both a friend and an enemy.  As many web designers and developers have learned in the past what it saves you in bandwidth is worth more than it&amp;#8217;s share of headaches.  With that said one of it&amp;#8217;s major headaches is old files on end users computers being used and breaking functionality.  This can be felt in layout as well as code (e.g. undefined function &amp;#8216;do_important_stuff()&amp;#8217;) if you&amp;#8217;re newly modified files never make it to your end users.&lt;/p&gt;
&lt;p&gt;There is an old trick that&amp;#8217;s been around for a good while and helped this a bit, an old annoying and version tracking pain in the ass trick.  You would change your file names with each major revision (core.v1.js or member.v1.css) which would cause browsers on the client side to request and store the file thinking it was new.  From a design aspect it wasn&amp;#8217;t to bad, from the version control aspect it wasn&amp;#8217;t to bad, and from the implementation aspect it wasn&amp;#8217;t to bad&amp;#8230; but it was annoying.&lt;/p&gt;
&lt;p&gt;Trying to move away from this you&amp;#8217;d more than likely discover the GET variable hack.  Basically appending useless garble to the end of your file name (file.css?garble=1351341) would ensure your end users browser fetch the file from your server.  This was usually done with a variable in your source or more often than not a Unix time stamp.  A concern with this method arose in your bandwidth bill if you did it wrong.  Most people would just append the time stamp, and since it changes everyone second every single page load would cause yet another extra and pointless call to the server for the same old unmodified file.  As if that wasn&amp;#8217;t already fugly and possibly expensive (depending on your traffic) it didn&amp;#8217;t work in some versions of IE.&lt;/p&gt;
&lt;p&gt;During a discussion on better ways to handle JavaScript cache busting with our head software engineer I came up with a fairly simple idea that I hadn&amp;#8217;t thought of before&amp;#8230; let the file bust it&amp;#8217;s own damn cache! Basically using PHP and file system mtimes we should be able to not only make this problem null and void but we can fix it once and never look back.&lt;/p&gt;
&lt;p&gt;Using a couple quick functions in PHP and a simple rewrite rule placed on the server we were up and running in no time. Some code snippets and explanations will follow.&lt;/p&gt;

&lt;p&gt;PHP include function:&lt;/p&gt;
&lt;pre&gt;function javascript_include($file_name = null){
    if (empty($file_name)){
        return false;
    }

    $file = WWW_WEB_DIR.'/js/'.$file_name;
    $timestamp = 0;

    if ($file_exists($file)) {
        $timestamp = filemtime($file);
    } else {
        return false;
    }

    $script_url = "/js/$timestamp/$file_name";

    return "&amp;lt;script type=\"text/javascript\" src=\"$script_url\"&amp;gt;&amp;lt;/script&amp;gt;&lt;script type='\"text/javascript\"'&gt;&lt;!--mce:0--&gt;&lt;/script&gt;\n&amp;#8221;;
}
&lt;br/&gt;&lt;br/&gt;&lt;/pre&gt;
&lt;p&gt;Using PHP function:&lt;/p&gt;
&lt;pre&gt;&amp;lt;?=javascript_include('site_core.js')?&amp;gt;&lt;/pre&gt;

&lt;p&gt;Resulting output:&lt;/p&gt;
&lt;pre&gt;&amp;lt;script type="text/javascript" src="/js/135134134/site_core.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;Rewrite rule:&lt;/p&gt;
&lt;pre&gt;RewriteRule (.*)/[0-9]+/(.*\.js)$ $1/$2 [PT]&lt;/pre&gt;

&lt;p&gt;Summary:&lt;/p&gt;
&lt;p&gt;So there you have it, completely automated and effective cache busting.  This works because browsers universally see the change in the directory structure and automatically assume it&amp;#8217;s a new file causing an initial fetch of the file and caching it.  If you publish changes to that file the mtime on the file system of the server will be updated, therefore the next request to include said file will have a different directory structure.&lt;/p&gt;
&lt;p&gt;Hope this helps others dealing with caching headaches.&lt;/p&gt;</description><link>http://chad.ill.ac/post/353013824</link><guid>http://chad.ill.ac/post/353013824</guid><pubDate>Mon, 25 Jan 2010 15:09:59 -0500</pubDate><category>CSS</category><category>JavaScript</category><category>JS</category><category>Cascading Style Sheets</category><category>Caching</category><category>Cache Busting</category></item><item><title>Flex Security sandbox violation</title><description>&lt;p&gt;Working in Flex and/or Flash you often run into the same problem many times and forget the easy and common sense answer.  Security sandbox violations for me is one of those cases.&lt;/p&gt;
&lt;p&gt;Googling for answers is usually fruitless and starts talking about server side crossdomain.xml policy files and meta data.  These are important in the long run but what about when they&amp;#8217;re in place and you&amp;#8217;re just testing new client side code.  Well I&amp;#8217;ve done this a few times now and EVERY time I do it I completely forget the quick and easy work around.  So if you&amp;#8217;ve looked into the crossdomain.xml tutorials and everything is ship shape but you still can&amp;#8217;t test from your local machine I suggest doing the following.&lt;/p&gt;
&lt;p&gt;1. right click on any .swf file&lt;/p&gt;
&lt;p&gt;2. choose &amp;#8220;Settings&amp;#8230;&amp;#8221;&lt;/p&gt;
&lt;p&gt;3. Privacy Tab&lt;/p&gt;
&lt;p&gt;4. &amp;#8220;Advanced&amp;#8230;&amp;#8221; button&lt;/p&gt;
&lt;p&gt;this will load up an Adobe page that allows you to change and tweak global settings in Flash player that can only be done so there.  It&amp;#8217;s pretty clutch.&lt;/p&gt;
&lt;p&gt;5. click &amp;#8220;Global Security Settings Panel&amp;#8221; on the left side menu&lt;/p&gt;
&lt;p&gt;6. click &amp;#8220;Edit Locations&amp;#8230;&amp;#8221;&lt;/p&gt;
&lt;p&gt;7. click &amp;#8220;Add Locations&amp;#8230;&amp;#8221;&lt;/p&gt;
&lt;p&gt;8. in the prompt window that comes up put /&lt;/p&gt;
&lt;p&gt;9. click confirm&lt;/p&gt;
&lt;p&gt;10. change radio button to &amp;#8220;Always allow&amp;#8221;&lt;/p&gt;
&lt;p&gt;Wahlah&amp;#8230; your local .swf files are now null and void as far as cross domain sandbox rules are concerned in the world of Flash player.&lt;/p&gt;
&lt;p&gt;What you&amp;#8217;ve essentially done here is tell Flash Player to ignore security rules for any files in your root files system.  If you&amp;#8217;re security minded and run a lot of .swf files that you don&amp;#8217;t trust locally I wouldn&amp;#8217;t recommend this setting as it completely overrides security measures put in place to protect you.  You can also use the &amp;#8220;browse&amp;#8221; functionality to pick specific files which realistically is much safer from a security stand point.  I myself don&amp;#8217;t worry about it because I don&amp;#8217;t store any .swf files locally when it boils down to it.&lt;/p&gt;</description><link>http://chad.ill.ac/post/256284338</link><guid>http://chad.ill.ac/post/256284338</guid><pubDate>Tue, 24 Nov 2009 20:31:31 -0500</pubDate></item><item><title>my new baby. (Cannondale CAAD9 6)</title><description>&lt;img src="http://24.media.tumblr.com/Fj4JZgoQWosnruldSNuXg4jNo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;my new baby. (Cannondale CAAD9 6)&lt;/p&gt;</description><link>http://chad.ill.ac/post/124790928</link><guid>http://chad.ill.ac/post/124790928</guid><pubDate>Tue, 16 Jun 2009 17:15:59 -0400</pubDate></item><item><title>have a Netbook?... want solid Linux support?...</title><description>&lt;p&gt;I currently have an Asus Eee PC (1002ha) and to say the least am not an avid Windows fan.  Since the day I unpackaged this puppy I have been on a quest to find the best OS I could for the lil guy.  So far I&amp;#8217;ve ran EasyPeasy and OS X (needs drivers sadly otherwise this would have never been written) and looked into running Moblin (although I must admit I never installed it).  Long story short EasyPeasy was my distro of choice.&lt;/p&gt;
&lt;p&gt;Recently 9.04 went stable and I had heard good things but after looking over the EasyPeasy forums decided not to upgrade.  Apparently it was breaking a lot of stuff and 8.10 was running solid enough to keep me content.&lt;/p&gt;
&lt;p&gt;Over memorial day weekend I upgraded my desktop (8.10) to 9.04 and bricked the box so I ventured over the Ubuntu.com to get a fresh 9.04 install disk.  After doing a clean install the system was unstable and Firefox was a mess.  So I decided to check out Ubuntu.com again to see if any others were reporting issues or if I just had a botched install.  That&amp;#8217;s when I noticed it&amp;#8230; 9.04 Netbook Remix Edition!  I&amp;#8217;m not sure how I missed this memo but seriously wtf!?  After looking over the wiki and confirming that the 1000h models were running fairly solid I was sold.&lt;/p&gt;
&lt;p&gt;I downloaded their .img file threw it on my thumb drive using my Windows machine (9.04 wasn&amp;#8217;t working yet) and plugged that puppy in.  The install was painless and fast and I was up and running in no time.  On the Ubuntu forums I had seen some issues of people reporting failures coming out of &amp;#8220;sleep mode/stand by&amp;#8221; and another user mentioned on their non-netbook that enabling &amp;#8220;Effects&amp;#8221; (and inturn upping the vid drivers) fixed the problem.  Now this is what shocked me&amp;#8230; even on my 1002ha I was able to enable &amp;#8220;Extra&amp;#8221; (wobbly windowns, drop shadows, fading menus&amp;#8230; the whole 9 baby!) under the effects panel (System-&amp;gt;Preferences-&amp;gt;Appearance-&amp;gt;Visual Effects) and not only did it work&amp;#8230; it worked well&amp;#8230; damn well.&lt;/p&gt;
&lt;p&gt;I had never expected the Compiz stuff to be so snappy on such low end video hardware (Intel Integrated 1.6Ghz Atom &amp;amp; 2 gigs of RAM) but it is!  One of my biggest pet peeves with my old EasyPeasy install were the hoops you&amp;#8217;d have to jump through to disable &amp;#8220;Tap to Click&amp;#8221;.  I&amp;#8217;d read over tutorials&amp;#8230; borked some xorg configs and still because of the &amp;#8220;special&amp;#8221; touchpad they used on the 1002ha (multitouch &amp;#8230; some random vendor) I wasn&amp;#8217;t able to get it to work properly.  With 9.04 Netbook Edition it was as simple as unchecking a box in mouse preferences!&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re running EasyPeasy (love you guys, but sorry) I HIGHLY RECOMMEND you go ahead and grab the new official Ubuntu netbook build (link at the end of the article) and get it on your Eee PC A.S.A.P.  I&amp;#8217;m one very happy camper now that my lil guy has all the bells and whistles.  From my testing so far multitouch works, web cam works, sound works, function keys (brighness, volume, etc) all work (the mute button didn&amp;#8217;t work under EasyPeasy)!&lt;/p&gt;
&lt;p&gt;Now these next parts are mere speculation (as when you&amp;#8217;re happy with a piece of software you tend to be a touch biased) and I haven&amp;#8217;t tested these claims thoroughly but the machine feels faster, battery life seems to have improved, Flash (a known resource hog on all Linux boxes) seems to even perform better (sudo apt-get install flashplugin-nonfree).&lt;/p&gt;
&lt;p&gt;Hope this helps push a couple of other curious netbook owners over the edge and helps them take the plunge!&lt;/p&gt;
&lt;p&gt;Ubuntu Netbook Edition&amp;#160;: &lt;a href="http://www.ubuntu.com/getubuntu/download-netbook" target="_blank"&gt;http://www.ubuntu.com/getubuntu/download-netbook&lt;/a&gt;&lt;/p&gt;</description><link>http://chad.ill.ac/post/113448980</link><guid>http://chad.ill.ac/post/113448980</guid><pubDate>Tue, 26 May 2009 18:48:34 -0400</pubDate></item></channel></rss>

