<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unsharpTech &#187; How2</title>
	<atom:link href="http://unsharptech.com/category/how2/feed/" rel="self" type="application/rss+xml" />
	<link>http://unsharptech.com</link>
	<description>when the bleeding edge just doesn&#039;t cut it</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:06:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Enable Gnome Video Thumbnails in Arch Linux</title>
		<link>http://unsharptech.com/2009/12/07/enable-nuatilus-gnome-video-thumbnails-in-arch-linux/</link>
		<comments>http://unsharptech.com/2009/12/07/enable-nuatilus-gnome-video-thumbnails-in-arch-linux/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 13:28:32 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Arch]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://unsharptech.com/?p=302</guid>
		<description><![CDATA[Gnome&#8217;s file manager Nautilus does a great job of automatically thumbnailing all kinds of files including pretty much any video file. But, in a fresh Arch Linux install you still need a few gstreamer packages to enable totem-video-thumbnailer to do its job&#8230; 1. Install necessary packages (as root): pacman -Sy --needed totem gstreamer0.10-{{bad,good,ugly,base}{,-plugins},ffmpeg} 2. Delete [...]]]></description>
			<content:encoded><![CDATA[<p>Gnome&#8217;s file manager Nautilus does a great job of automatically thumbnailing all kinds of files including pretty much any video file.</p>
<p>But, in a fresh Arch Linux install you still need a few <code>gstream</code><code>er</code> packages to enable <code>totem-video-thumbnailer</code> to do its job&#8230;<span id="more-302"></span></p>
<h4>1. Install necessary packages (as root):</h4>
<pre class="brush: bash">pacman -Sy --needed totem gstreamer0.10-{{bad,good,ugly,base}{,-plugins},ffmpeg}</pre>
<h4>2. Delete old video thumbnails to force generation of new ones:</h4>
<pre class="brush: bash">rm -rf ~/.thumbnails/fail</pre>
<h4>3. Browse a folder of video files in Nautilus:</h4>
<p><a href="http://unsharptech.com/wp-content/uploads/nautilus-video-thumbnails.png" rel="lightbox[302]"><img class="alignnone size-medium wp-image-307" title="nautilus-video-thumbnails" src="http://unsharptech.com/wp-content/uploads/nautilus-video-thumbnails-300x222.png" alt="nautilus-video-thumbnails" width="300" height="222" /></a></p>
<p>In some cases you may need to restart Nautlius for the changes to take effect:</p>
<pre class="brush: bash">killall nautilus</pre>
<p>&#8230;or simply log out and log in again.</p>
<h4>System Info</h4>
<ul>
<li>Arch Linux &#8211; Kernel 2.6.31-ARCH</li>
<li>Gnome 2.28.0</li>
<li>packages <code>gnome</code> &amp; <code>gnome-extra</code></li>
</ul>
<p><strong>Source</strong></p>
<blockquote><p><a href="http://wiki.archlinux.org/index.php/Common_codecs">http://wiki.archlinux.org/index.php/Common_codecs</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2009/12/07/enable-nuatilus-gnome-video-thumbnails-in-arch-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hide Administrator from Welcome Screen in Vista</title>
		<link>http://unsharptech.com/2009/01/22/hide-administrator-from-welcome-screen-in-vista/</link>
		<comments>http://unsharptech.com/2009/01/22/hide-administrator-from-welcome-screen-in-vista/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 22:04:20 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Fixes]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[dot.help Lab]]></category>

		<guid isPermaLink="false">http://unsharptech.com/?p=182</guid>
		<description><![CDATA[By default the Administrator account in Vista is Disabled &#8211; everything is run in a sudo fashion without actually logging in to the Administrator account. Some times due to external password recovery systems or other various reasons the built-in Administrator account is enabled, causing it to show up on the Welcome Screen. In order to [...]]]></description>
			<content:encoded><![CDATA[<p>By default the Administrator account in Vista is Disabled &#8211; everything is run in a sudo fashion without<a href="http://unsharptech.com/wp-content/uploads/vista-icon.jpg" rel="lightbox[182]"><img class="alignright size-full wp-image-213" title="vista-icon" src="http://unsharptech.com/wp-content/uploads/vista-icon.jpg" alt="vista-icon" width="119" height="110" /></a> actually logging in to the Administrator account. Some times due to external password recovery systems or other various reasons the built-in Administrator account is enabled, causing it to show up on the Welcome Screen.</p>
<p>In order to stop the Administrator account from showing as a login option on the Welcome Screen in Windows Vista you need to set the Administrator account to not active with the <code>net user</code> command from an Administrative <code>cmd</code> prompt as follows:</p>
<pre class="brush: php">net user Administrator /active:no</pre>
<p>Some people report that the &#8220;/&#8221; causes the command to fail, try it without:</p>
<pre class="brush: php">net user Administrator active:no</pre>
<p>From then on the the Administrator account should no longer show on the Welcome Screen.</p>
<p>SOURCE:</p>
<blockquote><p><a href="http://www.mydigitallife.info/2007/08/10/activate-enable-and-show-administrator-account-in-vista-welcome-screen/">http://www.mydigitallife.info/2007/08/10/activate-enable-and-show-administrator-account-in-vista-welcome-screen/</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2009/01/22/hide-administrator-from-welcome-screen-in-vista/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Atheros Wireless in Ubuntu 8.10 Intrepid Ibex</title>
		<link>http://unsharptech.com/2008/10/31/atheros-wireless-in-ubuntu-810-intrepid-ibex/</link>
		<comments>http://unsharptech.com/2008/10/31/atheros-wireless-in-ubuntu-810-intrepid-ibex/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 17:38:55 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Fixes]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://unsharptech.com/?p=115</guid>
		<description><![CDATA[Did a fresh install + updates of Kubuntu 8.10 on a customer&#8217;s laptop and had no wireless even though it&#8217;s an Atheros chipset. UPDATE: I recently tried this method on a similar Acer laptop with Ubuntu 8.10 AMD64 with no results. After searching, I used another guide that makes compiling madwifi from source simple. If [...]]]></description>
			<content:encoded><![CDATA[<p>Did a fresh install + updates of Kubuntu 8.10 on a customer&#8217;s laptop and had no wireless even though it&#8217;s an Atheros chipset.</p>
<p><span id="more-115"></span></p>
<p><strong>UPDATE:</strong></p>
<blockquote><p>I recently tried this method on a similar Acer laptop with Ubuntu 8.10 AMD64 with no results. After searching, I used <a href="http://blog.hyperandy.com/2008/11/01/atheros-ar242x-ubuntu-810-ibex/">another guide</a> that makes compiling madwifi from source simple. If my method doesn&#8217;t work for you, remove the backports modules:</p>
<pre class="brush: bash">sudo apt-get remove linux-backports-modules-intrepid-generic
</pre>
<p>then reboot, and try out the below guide. Thank you Hyperandy.</p>
<p>Link: <a href="http://blog.hyperandy.com/2008/11/01/atheros-ar242x-ubuntu-810-ibex/">http://blog.hyperandy.com/2008/11/01/atheros-ar242x-ubuntu-810-ibex/</a></p></blockquote>
<p>Hardware:</p>
<ul>
<li>Laptop: Acer Aspire 4520</li>
<li>Wireless Card: Atheros AR242x Communications Inc. 802.11abg</li>
</ul>
<pre class="brush: bash">lspci | grep &quot;Atheros&quot;
07:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
</pre>
<p>Resolution:</p>
<pre class="brush: bash">sudo apt-get install linux-backports-modules-intrepid-generic
</pre>
<p>After above install completes, <strong>reboot</strong>, then open up the Hardware Drivers manager (<strong>jockey-gtk</strong> or <strong>jockey-kde</strong>) and disable <strong>&#8220;Support for Atheros 802.11 wireless LAN cards&#8221;</strong> and make sure that &#8220;<strong>Support for 5xxx series of Atheros 802.11 wireless LAN cards</strong>&#8221; is enabled then <strong>reboot</strong>. You may need to reboot to see both drivers in the Hardware Drivers manager.</p>
<p>This is at least a temporary fix, you&#8217;ll end up with the ath5k drivers- hopefully a stable universal method for Atheros card support will become available soon.</p>
<p>Source:<br />
<a href="http://www.ubuntu.com/getubuntu/releasenotes/810">8.10 Release Notes | Ubuntu</a></p>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/10/31/atheros-wireless-in-ubuntu-810-intrepid-ibex/feed/</wfw:commentRss>
		<slash:comments>63</slash:comments>
		</item>
		<item>
		<title>Using SIW to Find Hardware in Windows</title>
		<link>http://unsharptech.com/2008/08/21/using-siw-to-find-hardware-in-windows/</link>
		<comments>http://unsharptech.com/2008/08/21/using-siw-to-find-hardware-in-windows/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 05:55:41 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://unsharptech.com/?p=102</guid>
		<description><![CDATA[I&#8217;ve often resorted to loading up a Linux livecd and running &#8220;lspci&#8221; just to get an idea of what hardware is in a box. Let&#8217;s face it, even if box manufacturers do provide the drivers you need, that model may have shipped with one of 4 different NICs, video cards, etc. So it used to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://unsharptech.com/wp-content/uploads/siw_demo.jpg" rel="lightbox[102]"><img class="alignright size-thumbnail wp-image-101" title="siw_demo" src="http://unsharptech.com/wp-content/uploads/siw_demo-150x150.jpg" alt="" width="150" height="150" /></a>I&#8217;ve often resorted to loading up a Linux livecd and running &#8220;<a href="http://en.wikipedia.org/wiki/Lspci">lspci</a>&#8221; just to get an idea of what hardware is in a box. Let&#8217;s face it, even if box manufacturers do provide the drivers you need, that model may have shipped with one of 4 different NICs, video cards, etc. So it used to be I had to run a linux cd and the lspci command to get the PCI devices table but not anymore&#8230;</p>
<p><span id="more-102"></span></p>
<p>I thought SIW (System Information for Windows) was a nifty tool from the beginning, it replaced CPU-Z for RAM and Mobo information and since discovering the PCI listing, getting appropriate drivers has become much easier. Now don&#8217;t think just cause it&#8217;s under PCI that only PCI related devices are there, pretty much every relevant device is in there including VGA controllers, Bluetooth adapters, SATA Controllers, and more.</p>
<p>Anyway, all you gotta do is get siw.exe from <a href="http://www.gtopala.com/">gtopala.com</a>, run it and go down to the Hardware tree, then click PCI. You can also click on the Hardware menu up top then PCI or hit File, then Create Report File to get it to go.</p>
<p>Don&#8217;t forget, SIW also has a Password Revealer (Tools -&gt; Eureka!), a MAC Address Changer (Tools -&gt; Mac Address Changer), a Licenses List (Software -&gt; Licenses), and much more fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/08/21/using-siw-to-find-hardware-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful find Commands</title>
		<link>http://unsharptech.com/2008/08/16/useful-find-commands/</link>
		<comments>http://unsharptech.com/2008/08/16/useful-find-commands/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 13:34:54 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[How2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[dot.help Lab]]></category>

		<guid isPermaLink="false">http://unsharptech.com/?p=92</guid>
		<description><![CDATA[Recursive, multi-file find and replace with grep and xargs for performance: Source: http://www.jonasblog.com/2006/05/search-and-replace-in-all-files-within-a-directory-recursively.html grep -rl &#039;what_to_find&#039; ./ &#124; xargs sed -i &#039;s/what_to_find/what_to_replace_with/g&#039; Put  a not in front of that expression: find ./ ! -type d Escape wildcards to avoid the shell expanding them: If you just quote it; &#8220;*.avi&#8221; you can often run into trouble. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Recursive, multi-file find and replace with grep and xargs for performance:</strong></p>
<p>Source: <a href="http://www.jonasblog.com/2006/05/search-and-replace-in-all-files-within-a-directory-recursively.html">http://www.jonasblog.com/2006/05/search-and-replace-in-all-files-within-a-directory-recursively.html</a></p>
<pre class="brush: bash">grep -rl &#039;what_to_find&#039; ./ | xargs sed -i &#039;s/what_to_find/what_to_replace_with/g&#039;</pre>
<p><strong>Put  a not in front of that expression:</strong></p>
<pre class="brush: bash">find ./ ! -type d</pre>
<p><strong>Escape wildcards to avoid the shell expanding them:</strong></p>
<p>If you just quote it; <em>&#8220;*.avi&#8221;</em> you can often run into trouble.</p>
<pre class="brush: bash">find ./ -name \*.avi</pre>
<p><strong>Prune empty directories</strong></p>
<pre class="brush: bash">find ./ -depth -type d -empty -exec rmdir -v {} \;</pre>
<p>Source: <a href="http://duramecho.com/ComputerPrograms/DeleteEmptyDirectories/index.html">http://duramecho.com/ComputerPrograms/DeleteEmptyDirectories/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/08/16/useful-find-commands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable Recent Documents in Gnome 2.22.3</title>
		<link>http://unsharptech.com/2008/08/08/disable-recent-documents-in-gnome-2223/</link>
		<comments>http://unsharptech.com/2008/08/08/disable-recent-documents-in-gnome-2223/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 10:45:02 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Arch]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Fixes]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://unsharptech.com/?p=72</guid>
		<description><![CDATA[So even Windows lets you disable the Recent Documents feature, but for some reason Gnome really wants to remember what files you&#8217;ve been messing with. Personally I never use this menu item (usually under Places in the Gnome Main Menu) and find it to be a bit of a privacy concern. Surprisingly enough there are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://unsharptech.com/wp-content/uploads/menu-no-recent.jpg" rel="lightbox[72]"><img class="alignright size-thumbnail wp-image-73" title="menu-no-recent" src="http://unsharptech.com/wp-content/uploads/menu-no-recent-150x150.jpg" alt="" width="150" height="150" /></a>So even Windows lets you disable the Recent Documents feature, but for some reason Gnome really wants to remember what files you&#8217;ve been messing with. Personally I never use this menu item (usually under <em>Places</em> in the Gnome Main Menu) and find it to be a bit of a privacy concern.</p>
<p>Surprisingly enough there are no documented settings for Recent Documents, not even something in gconf-editor, so people have been going stone age to prevent this functionality. In the past you could change permissions for the file that stores the data in your home directory, but it seems in later versions of Gnome the following is the current method of choice.</p>
<p><span id="more-72"></span></p>
<p><strong>METHOD:</strong></p>
<blockquote><p>Enter the following into a terminal:</p>
<pre class="brush: bash">rm ~/.recently-used.xbel
mkdir ~/.recently-used.xbel</pre>
</blockquote>
<p>When you&#8217;re done, go check your menu and Recent Documents should be grayed out.</p>
<p>This works because the data concerning your recent documents can&#8217;t be written to a directory and the Recent Documents menu item is simply disabled. (I played around with retaining the text file and changing its permissions, but they were eventually always overwritten.)</p>
<p><strong>NOTES:</strong></p>
<blockquote><p>It has been mentioned that you may receive GTK related warnings in the console after applying this, since we did a sort of end-run that&#8217;s kind of expected.</p>
<p>There was another method that involved making the file immutable (<em>sudo chattr +i ~/.recently-used.xbel</em>) but this is only for ext2/ext3 filesystems (I prefer JFS whenever applicable).</p>
<p>There may also be a left over file, <em>~/.recently_used</em> that you can also remove:</p>
<pre class="brush: bash">rm ~/.recently-used</pre>
</blockquote>
<p><strong>SOURCES:</strong></p>
<blockquote><p><a href="http://bbs.archlinux.org/viewtopic.php?pid=212094#p212094">Arch Linux Forums /  Disable Gnome Recent Documents [solved]</a></p>
<p><a href="http://ph.ubuntuforums.com/showthread.php?p=4652216">Disable recent documents &#8211; Ubuntu Forums</a></p></blockquote>
<p>I take no responsibility for coming up with this hack, I just wanted to clearly document it. BTW, this has been a problem since 2005 &gt; <a href="https://bugs.launchpad.net/gnome-panel/+bug/30942">Bug 30942 – Request to add option to disable &#8216;Recent Documents&#8217; lists</a></p>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/08/08/disable-recent-documents-in-gnome-2223/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Join two .avi Videos with Mencoder/Mplayer</title>
		<link>http://unsharptech.com/2008/08/05/join-two-avi-videos-with-mencodermplayer/</link>
		<comments>http://unsharptech.com/2008/08/05/join-two-avi-videos-with-mencodermplayer/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 12:25:47 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[How2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://unsharptech.com/?p=37</guid>
		<description><![CDATA[A lot of videos available from various sources are often encoded as .avi files close to 700MB in order to fit on a singleCD-R. This works out just great, but sometimes vids are split into two 700MB .avi files to fit two CDs so you get a Coolest-Movie-EVER_-_[2010][xVid](mp3)_dUff-mAn_CD1.avi and another but with &#8220;CD2&#8221; instead. Well [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://unsharptech.com/2008/08/05/join-two-avi-videos-with-mencodermplayer/"><img title="join_video" src="http://unsharptech.com/wp-content/uploads/join_video.jpg" alt="" width="150" height="65" align="right" /></a>A lot of <em>videos</em> available from <em>various sources</em> are often encoded as .avi files close to 700MB in order to fit on a singleCD-R. This works out just great, but sometimes vids are split into two 700MB .avi files to fit two CDs so you get a<em> Coolest-Movie-EVER_-_[2010][xVid](mp3)_dUff-mAn_CD1.avi</em> and another but with &#8220;<em>CD2</em>&#8221; instead.</p>
<p><span id="more-37"></span></p>
<p>Well I tend to just let these vids chill on my hard drive where space isn&#8217;t an issue, so I&#8217;d rather just have one 1.4GB vid file instead. In order to cleanly join two halves of a .avi together I use <a title="MEncoder - Wikipedia" href="http://en.wikipedia.org/wiki/Mencoder">MEncoder</a> in the following command:</p>
<pre class="brush: bash">mencoder -oac copy -ovc copy -idx -o Final_Big_Output_File.avi First_Half_Video_File.avi Other_Half_Video_File.avi</pre>
<blockquote><p>So, <strong>Final_Big_Output_File.avi</strong> = the big output file to be created,</p>
<p><strong>First_Half_Video_File.avi</strong> = the path to the first half of the video,</p>
<p>and <strong>Other_Half_Video_File.avi</strong> = the path to the file with the second half.</p></blockquote>
<p><strong>Note:</strong> This method assumes that both halves have the same codec, resolution, etc.</p>
<p>MEncoder is usually packaged with its close friend MPlayer which is available on pretty much any platform. I&#8217;ve successfully tested this command on Arch Linux with MEncoder 1.0rc2-4.3.1 and Windows XP with MEncoder 1.0rc2-4.2.1 (just grabbed a binary from <a title="MPlayer HQ" href="http://www.mplayerhq.hu/">MPLayerHQ</a>) &#8211; besides, this is a popular method.</p>
<p>I know there are other ways to combine two .avi s but this was the cleanest and most reliable for me, if you have any others worth looking into please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/08/05/join-two-avi-videos-with-mencodermplayer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Echo PHP Nested Array Contents + Keys</title>
		<link>http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/</link>
		<comments>http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/#comments</comments>
		<pubDate>Sat, 03 May 2008 20:31:11 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Fixes]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/</guid>
		<description><![CDATA[I&#8217;ve always had some trouble with the syntax for accessing Nested Arrays and their Keys in PHP so I wanted to make note of this. Structure is as follows: print_r $contents; ([Cutbacks.jpg] =&#62; Array ( [time] =&#62; 1207637110 [hash] =&#62; 05dee882129fe1574bcc8379ad3a40ac [size] =&#62; 43928 ) [matrix3.zip] =&#62; Array ( [time] =&#62; 1208040588 [hash] =&#62; 5f317404880304b82e9502fb399f2737 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://unsharptech.com/wp-content/php.gif" alt="PHP Logo" align="right" />I&#8217;ve always had some trouble with the syntax for accessing Nested Arrays and their Keys in PHP so I wanted to make note of this.</p>
<p><span id="more-30"></span></p>
<p>Structure is as follows:</p>
<pre class="brush: php">print_r $contents;</pre>
<pre>([Cutbacks.jpg] =&gt; Array
(
[time] =&gt; 1207637110
[hash] =&gt; 05dee882129fe1574bcc8379ad3a40ac
[size] =&gt; 43928
)
[matrix3.zip] =&gt; Array
(
[time] =&gt; 1208040588
[hash] =&gt; 5f317404880304b82e9502fb399f2737
[size] =&gt; 46790
)
)</pre>
<p>Code:</p>
<pre class="brush: php">
foreach( $contents as $key =&gt; $list ) {
echo &#039;Filename: &#039; . $key . &quot;\n&quot;;
echo &#039;Time: &#039; . $list[&#039;time&#039;] . &quot;\n&quot;;
echo &#039;Hash: &#039; . $list[&#039;hash&#039;] . &quot;\n&quot;;
echo &#039;Size: &#039; . $list[&#039;size&#039;] . &quot;\n&quot;;
echo &#039;----Next File----&#039; . &quot;\n&quot;;
}</pre>
<p>Outputs:</p>
<pre>Filename: Cutbacks.jpg
Time: 1207637110Hash: 05dee882129fe1574bcc8379ad3a40ac
Size: 43928
----Next File----
Filename: matrix3.zip
Time: 1208040588
Hash: 5f317404880304b82e9502fb399f2737
Size: 46790
----Next File----</pre>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: Convert all Values in Column to Upper Case</title>
		<link>http://unsharptech.com/2008/02/29/mysql-convert-all-values-in-column-to-upper-case/</link>
		<comments>http://unsharptech.com/2008/02/29/mysql-convert-all-values-in-column-to-upper-case/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 03:18:24 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[How2]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[osCommerce]]></category>

		<guid isPermaLink="false">http://unsharptech.com/2008/02/29/mysql-convert-all-values-in-column-to-upper-case/</guid>
		<description><![CDATA[Recently using osCommerce I had a customer who wished to have all the products&#8217; names in uppercase but they had been entered in mixed case. After having some trouble finding a simple answer through Google, I pieced together this simple query that can also be adapted to other situations. The below is a MySQL query [...]]]></description>
			<content:encoded><![CDATA[<p>Recently using <strong>osCommerce </strong>I had a customer who wished to have all the products&#8217; names in uppercase but they had been entered in mixed case. After having some trouble finding a simple answer through Google, I pieced together this simple query that can also be adapted to other situations.</p>
<p><a href="http://unsharptech.com/2008/02/29/mysql-convert-all-values-in-column-to-upper-case/"><img src="http://unsharptech.com/wp-content/mysql_query.gif" alt="MySQL Query" /></a></p>
<p>The below is a <strong>MySQL query</strong> to update all of the products&#8217; names in an <strong>osCommerce </strong>catalog to <strong>uppercase </strong>- you can copy this into <strong>phpMyAdmin</strong>.</p>
<pre class="brush: sql">UPDATE products_description SET `products_name` = UPPER( `products_name` )</pre>
<p><strong>OR GENERICALLY:</strong></p>
<pre class="brush: sql">UPDATE table_name SET `column_name` = UPPER( `column_name` )</pre>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/02/29/mysql-convert-all-values-in-column-to-upper-case/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The REAL Way to Change Lost Passwords in Ubuntu</title>
		<link>http://unsharptech.com/2007/11/11/the-real-way-to-change-lost-passwords-in-ubuntu/</link>
		<comments>http://unsharptech.com/2007/11/11/the-real-way-to-change-lost-passwords-in-ubuntu/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 09:33:37 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Fixes]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://unsharptech.com/2007/11/11/the-real-way-to-change-lost-passwords-in-ubuntu/</guid>
		<description><![CDATA[If you lose any of your user passwords &#8211; including root you can change your password booting into single user mode. What you aren&#8217;t likely to find off the bat is the proper instructions to do it. They are out there, but chances are you will have to dig a little after some frustration. The [...]]]></description>
			<content:encoded><![CDATA[<p>If you lose any of your user passwords &#8211; including <em>root</em> you can change your password booting into single user mode. What you aren&#8217;t likely to find off the bat is the proper instructions to do it. They are out there, but chances are you will have to dig a little after some frustration. The main differece between all those super simple solutions and the one mentioned here is that you need to remount the OS drive in order to properly write your changes. This method has worked with the last three major releases of Ubuntu including <em>Feisty</em>. So, here&#8217;s the procedure&#8230;</p>
<p><span id="more-8"></span></p>
<blockquote><p><strong>Scroll down for simplified instructions!</strong></p></blockquote>
<ol>
<li>Reboot, when the message from GRUB comes up, hit <em>Escape</em> to view the boot menu.</li>
<li>Scroll down to the first like with &#8220;Recovery Mode&#8221; in the title ane hit &#8220;e&#8221; to edit that boot line.</li>
<li>Select the like that starts with &#8220;kernel&#8221;, hit &#8220;e&#8221; to edit.</li>
<li>At the end of the line, the option &#8220;single&#8221; should already be there, leave a space after single and add &#8220;init=/bin/bash&#8221; this makes it so that you immediately are dumped to a root command line.</li>
<li>Hit<em> Enter</em>, then &#8220;b&#8221; to boot. Wait to boot and be left at a root console &#8211; it will look like &#8220;<em>root@(none):/#</em>&#8220;<em>.</em></li>
<li>Remount the OS partition so that it&#8217;s writable (in this example &#8220;hda1&#8243; &#8211; maybe &#8220;sda1&#8243; or otherwise) with the command &#8220;mount /dev/hda1/ -o remount,rw&#8221;</li>
<li>From there you can issue the command &#8220;passwd &lt;username&gt;&#8221; or just &#8220;passwd&#8221; for the root user password and you can enter the new password for the user and reboot.</li>
</ol>
<p><strong>Simplified instructions:</strong></p>
<ol>
<li><span class="postbody">Hit escape to enter GRUB menu.</span></li>
<li><span class="postbody">Hit &#8220;e&#8221; on the first recovery boot line.</span></li>
<li><span class="postbody">Select the line beginning with &#8220;kernel&#8221; and hit &#8220;e&#8221;</span></li>
<li><span class="postbody">Leave a space after &#8220;single&#8221; and add &#8220;init=/bin/bash&#8221;</span></li>
<li><span class="postbody">Hit<em> Enter</em> then &#8220;b&#8221; to boot. </span></li>
<li><span class="postbody">Wait to boot and be dumped at a root console.</span></li>
<li><span class="postbody">Remount the OS partition &#8220;mount /dev/hda1 / -o remount,rw&#8221;</span></li>
<li>Use &#8220;passwd &lt;username&gt;&#8221; to change the user password .</li>
<li>Reboot.</li>
</ol>
<p>I take no credit for this procedure, I definitely wouldn&#8217;t be able to figure that all out on my own.</p>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2007/11/11/the-real-way-to-change-lost-passwords-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
