<?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>Jacob A. Rau &#187; Tutorials</title>
	<atom:link href="http://jacobarau.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://jacobarau.com</link>
	<description>The personal blog of Jacob A. Rau</description>
	<lastBuildDate>Sun, 25 Jul 2010 17:20:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to regain free space in VirtualBox images (Windows guest)</title>
		<link>http://jacobarau.com/2010/07/how-to-regain-free-space-in-virtualbox-images-windows-guest/</link>
		<comments>http://jacobarau.com/2010/07/how-to-regain-free-space-in-virtualbox-images-windows-guest/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 18:39:32 +0000</pubDate>
		<dc:creator>Jacob A. Rau</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://jacobarau.com/?p=156</guid>
		<description><![CDATA[Over the course of using a VirtualBox virtual machine, you will find that your virtual disk image file (assuming it is a dynamicly-expanding disk, rather than a fixed-size one) will grow in size. This isn&#8217;t normally a problem, but if you happen to be running low on disk space and have a well-used VM, the [...]]]></description>
			<content:encoded><![CDATA[<p>Over the course of using a VirtualBox virtual machine, you will find that your virtual disk image file (assuming it is a dynamicly-expanding disk, rather than a fixed-size one) will grow in size. This isn&#8217;t normally a problem, but if you happen to be running low on disk space and have a well-used VM, the difference between what the guest and host OS reports used can be dramatic. For example, your guest OS reports 15GB used, but the actual VDI is just over 30GB.</p>
<p>What gives?<span id="more-156"></span> Well, when you started with that fancy dynamic disk, it wasn&#8217;t hard for VirtualBox to remember that the entire drive was empty, so the VDI had pretty much no data stored in it; any sectors of the drive which weren&#8217;t present in the VDI were assumed to be blank. This is how, despite the guest OS thinking the drive is a 5TB drive, the VDI file only takes up a few GB after a clean Windows installation.</p>
<p>As you installed more stuff in the VM, VirtualBox needed to write the contents of the non-blank sectors to the VDI, and so the VDI grew as expected.</p>
<p>Now, here&#8217;s the catch: when you deleted the pile of data from the VM, the guest OS didn&#8217;t actually go through and blank out every sector which was in use, as this would be insanely slow. It only marked that chunk of space as free in a table in a different area of the drive.</p>
<p>So, without making any assumptions about how the data is stored, VirtualBox has no way to tell the difference between an important glob of data which allows Windows to boot and a glob of deleted love letters to your now-ex. Because of this, the VDI doesn&#8217;t shrink immediately when you delete files.</p>
<p>Okay, so how can you fix it?</p>
<p>First, since VirtualBox looks for consecutive blank sectors to drop from the VDI, the free space on the drive actually needs to be blank. There are many tools to do this, but the best one I&#8217;ve found is the <a href="http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx" target="_blank">Sysinternals&#8217; SDelete tool</a>. Running <code>sdelete -c</code> inside the VM will blank out all free space. <strong>Don&#8217;t use the <code>-z</code> option</strong>; <code>-z</code> first blanks the free space, then proceeds to write random data, which will actually <em>lose</em> you space, rather than gaining it. <code>sdelete</code> will take a significant amount of time, depending on your hardware and disk size, as well as factors such as star alignment and ocean temperature.</p>
<p>Once the free space wipe is complete, shut down the VM. The VDI will still be huge, as it now has a whole bunch of unnecessary data saying &#8220;this sector is blank&#8221;. To remove this fluff, on the host OS, run</p>
<pre>VBoxManage modifyvdi <em>full_path_to_vdi</em> compact</pre>
<p>where <code>full_path_to_vdi</code> is the full path to the disk image (if on Windows, include the drive letter onward, such as <code>C:\Images\image.vdi</code>; if on anything else, use the absolute path such as <code>/home/username/image.vdi</code>). After a few minutes, the VDI should shrink down to roughly the size of the contained data.</p>
<p>Of course, the image will grow once again over time, but as far as I can tell, there isn&#8217;t a much more elegant way of mitigating this problem.</p>
<p>That&#8217;s it for this tutorial. If you run into any problems or just want to let me know what you think, feel free to do so in the combox below.</p>
]]></content:encoded>
			<wfw:commentRss>http://jacobarau.com/2010/07/how-to-regain-free-space-in-virtualbox-images-windows-guest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make your Verizon phone your own</title>
		<link>http://jacobarau.com/2009/03/make-your-verizon-phone-your-own/</link>
		<comments>http://jacobarau.com/2009/03/make-your-verizon-phone-your-own/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 12:42:41 +0000</pubDate>
		<dc:creator>Jacob A. Rau</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://jacobarau.com/?p=32</guid>
		<description><![CDATA[Here&#8217;s a tutorial I wrote up to make custom ringtones for Verizon phones. NOTE: This tutorial is still in beta, meaning that it may have some rough patches. I am still revising it, and need to test it on other platforms and with other phones. I am not responsible if this causes any physical, mental, [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a tutorial I wrote up to make custom ringtones for Verizon phones.</p>
<p><em>NOTE: This tutorial is still in beta, meaning that it may have some rough patches. I am  still revising it, and need to test it on other platforms and with other phones. I am not  responsible if this causes any physical, mental, or emotional damage to you or anyone else.</em></p>
<h3>Introduction:</h3>
<p>Verizon likes to sell things. That in itself is not evil. What is evil is  the scheme they have come up with to profit from ringtones. The only way most  customers know of to get ringtones is through Verizon&#8217;s Tones Deluxe. It  has a fairly limited selection of songs (<a href="http://www.gummibar.net/">Gummibär</a> doesn&#8217;t get any love&#8230;) and  the ringtones are downright overpriced (a full-length MP3 from <a href="http://www.amazon.com/MP3-Music-Download/b?ie=UTF8&amp;node=163856011">Amazon MP3</a>: $0.99.  A 30-second clip from Tones Deluxe: $2.99. You do the math). Also, these tones are  lost once the time comes to upgrade to a new phone. What most customers don&#8217;t know  is that they can create their own ringtones and send them via e-mail to their handset.</p>
<p>Let me say that again. It is easy and, depending on your plan, free, to create  and send ringtones via e-mail to your phone. Let me show you how.<span id="more-32"></span></p>
<h3>The general idea</h3>
<p>You can send pictures and sounds to your handset by sending them as attachments to  an email to <em>your_10_digit_phone_number@vzwpix.com</em>. This seems simple  enough, so why do we need a whole tutorial for that, you might ask. I can just send  myself my collection of MP3s! Well, not so fast.</p>
<p>The average music file has a size of approximately 4-8<acronym title="megabytes">MB</acronym>. However,  since we will be sending the completed ringtone via Verizon&#8217;s PIX Messaging system, we must heed the  PIX gateway&#8217;s size restrictions. From experimentation, I have determined that a good rule of thumb  is to keep the size of a tone down to below 500<acronym title="kilobytes">kB</acronym>.</p>
<p>If the attachment is any larger than this, the PIX server makes it smaller, and in the process  trashes the quality of the tone. If Verizon has done this, it generally sounds like the ringtone is muffled.</p>
<p>In a moment, we will explain how to make a short clip of the part of the song you want,  preserving quality, to send to your handset.</p>
<h3>What you will need:</h3>
<ul>
<li>The song you want to use. Note that if it is protected with <a href="http://en.wikipedia.org/wiki/Digital_rights_management"><acronym title="digital rights management">DRM</acronym></a>,  it is difficult (and often impossible) to work with. Songs bought from the iTunes Store  are usually DRM&#8217;d, and so are all songs downloaded from Ruckus. Working with DRM&#8217;d files is a  topic that is out of the scope of this tutorial.</li>
<li>A sound editor. For this tutorial, I will be using <a href="http://audacity.sourceforge.net/">Audacity</a>, a free, open-source audio editor. It is compatible with any recent operating system (Windows 98 onward; Mac OS 9.0 onward; any mainstream GNU/Linux flavor).</li>
<li>The LAME MP3 encoder. Follow <a href="http://audacity.sourceforge.net/help/faq?s=install&amp;i=lame-mp3">this tutorial</a> to download and install it.</li>
</ul>
<h3>Instructions:</h3>
<h4>Prepare the sound.</h4>
<p>We need to reduce the size of the desired song. There are a few ways to do this. Open the song in Audacity.  The blue blobiness is a graph of the loudness of the sound throughout the song. Press  the play button to verify that the song loaded properly. If it sounds okay, go ahead and stop it.</p>
<h5>Reducing the size: convert to mono</h5>
<p>The easiest way to cut the file size down is to convert the two tracks (left and right) into one.  There is no difference for the phone; you will not hear any distinction between left and right out  of the single speaker that most phones play ringtones out of.</p>
<p>To convert the song to mono, click the &#8220;Tracks&#8221; menu, and click &#8220;Stereo to Mono&#8221;. After a few  seconds, the two graphs will be merged into a single track. At this point, the size of the song  was just cut in half.</p>
<h5>Reducing the size: cut down to ringtone length</h5>
<p>Your phone is only going to ring for 15-20 seconds. There is no need to have a full-length  song on your phone for only a fraction of its length to be played. Therefore, you should trim  the song down to, at most, a 30-second clip. You can also speed up a longer part of a song to  fit within the time limit.</p>
<p>To find the spot in the song where you want the beginning of the ringtone to be, click somewhere  in the graph. The further right, the closer to the end of the song. Once you click, press Play.  It will start playing from that point. If it is at the wrong position in the song, click Stop  and click a different point within the song. Once you find the point where you want the ringtone  to start, hover the mouse over the vertical line that starts the ringtone. Click and drag this  line to cover the desired portion of the song. At this point, you can press Play, and only the  area you highlighted will play. This is what the ringtone will sound like. You can drag the beginning  and the end of the selection until you are satisfied with the clip you have selected. If the clip is  too long right now, you can speed it up to fit the time limit; read the next paragraph to learn how.</p>
<p>Another method of trimming the length down is to speed up the song. Thanks to a very intelligent  plugin for Audacity, this is hardly the &#8220;Chipmunks&#8221; proposition it used to be. To speed up a part  of the song, select it (using the same method described above) and click &#8220;Effect&#8221;, then &#8220;Change Tempo&#8230;&#8221;.  This brings up a dialog asking what the desired tempo change is. You can either specify it as a percentage  or by specifying the initial tempo and the desired new tempo. Once you click &#8220;OK&#8221;, the plugin will take a  moment to work, and then you can press Play to hear the result. If you are unhappy with it, you can click  &#8220;Edit&#8221;, then &#8220;Undo Change Tempo&#8221; to go back.</p>
<p>Once you are satisfied with the selected clip of audio, click &#8220;Edit&#8221;, then &#8220;Trim&#8221;. This removes  all audio before and after the selection. To make the selection start at the beginning of the track  as it should, click &#8220;Tracks&#8221;, &#8220;Align Tracks&#8230;&#8221;, &#8220;Align with Zero&#8221;.</p>
<h4>Save the ringtone.</h4>
<p>When making an MP3, the encoder throws out some quality for the sake of saving disk space. The lower  amount of bits per second it uses, the worse it will sound. When listening on a stereo or MP3 player,  the effects of a low bitrate are noticable. However, on a cell phone&#8217;s speaker, even the highest-quality  audio file sounds bad, so we can save quite a bit of space without the end result changing dramatically.</p>
<p>It&#8217;s time to save the ringtone. Click &#8220;File&#8221;, &#8220;Export&#8230;&#8221;. This opens a file saving dialog. Remember where  you save the final result, and take care to not overwrite your original copy of the song you used&#8211;pick a  different file name. Change the file type to &#8220;MP3 Files&#8221;, and click the &#8220;Options&#8230;&#8221; button. This opens  a screen titled &#8220;Specify MP3 Options&#8221;. Make sure &#8220;Bit Rate Mode&#8221; is set to &#8220;Constant&#8221;, as other settings  may not be compatible with your phone. Set the quality to something lower than &#8220;128 kbps&#8221;. I find that  &#8220;64 kbps&#8221; does a pretty good job; this is a matter of personal preference. Click &#8220;OK&#8221; when done in this  screen, and click Save to save the ringtone.</p>
<h4>Send yourself the ringtone.</h4>
<p>This is the simplest of steps. Simply e-mail the MP3 as an attachment to <em>your_10_digit_phone_number@vzwpix.com</em>.  Depending on your connection speed, your e-mail provider, network load, and other factors too numerous to  list, the message should show up on your handset as a PIX message within a few seconds to a few minutes.</p>
<p>Once it shows up, with any luck, you will be able to select &#8220;Save as Ringtone&#8221;, or a similar menu option  to add the MP3 to your ringtones collection on your phone. This is the point where your mileage may vary.  If it does not work for you, email me at jacob.rau AT (remove me) gmail.com so that I can add your phone to  a &#8220;Not Compatible&#8221; list. So far, every phone I have done this on has worked.</p>
]]></content:encoded>
			<wfw:commentRss>http://jacobarau.com/2009/03/make-your-verizon-phone-your-own/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
