<?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>Esau SilvaEsau Silva</title>
	<atom:link href="http://esausilva.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://esausilva.com</link>
	<description>Just another random blog</description>
	<lastBuildDate>Sun, 19 May 2013 03:31:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>IntelliSense in Eclipse</title>
		<link>http://esausilva.com/2013/05/13/intellisense-in-eclipse/</link>
		<comments>http://esausilva.com/2013/05/13/intellisense-in-eclipse/#comments</comments>
		<pubDate>Mon, 13 May 2013 18:31:35 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[IntelliSense]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=787</guid>
		<description><![CDATA[By setting up some preferences in Eclipse, we can achieve an IntelliSense-like behavior in Eclipse. If you have ever used Microsoft Visual Studio, then let me explain what IntelliSense is. IntelliSense can speed up your coding by auto-completing your words as you type, lets say you have aVeryLongVariable in your code, as soon as you]]></description>
				<content:encoded><![CDATA[
<p>By setting up some preferences in Eclipse, we can achieve an IntelliSense-like behavior in Eclipse. If you have ever used Microsoft Visual Studio, then let me explain what IntelliSense is. IntelliSense can speed up your coding by auto-completing your words as you type, lets say you have aVeryLongVariable in your code, as soon as you start typing <em>aV</em>, a box will pop-up with the suggestions for auto-completion, you can either continue typing or just press enter and your variable will be auto-completed.<br />
<span id="more-787"></span></p>
<div class="AdBlockKiller">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>&nbsp;</p>
<p>By default, Eclipse can achieve this only by typing a period (.), or by pressing Ctrl+Space. With IntelliSense, the autocompletion pop-up box will appear as soon as you start typing, which comes really handy and speeds up your coding. You can read more about IntelliSense in <a title="Wikipedia" href="https://en.wikipedia.org/wiki/IntelliSense" target="_blank">Wikipedia</a></p>
<p><a class="shutterset_" title="" href="http://esausilva.com/wp-content/gallery/eclipseintellisense/eclipse-system.png"><img class="ngg-singlepic ngg-none" alt="eclipse-system" src="http://esausilva.com/wp-content/gallery/eclipseintellisense/thumbs/thumbs_eclipse-system.png" /></a> <a class="shutterset_" title="" href="http://esausilva.com/wp-content/gallery/eclipseintellisense/eclipse-variable.png"><img class="ngg-singlepic ngg-none" alt="eclipse-variable" src="http://esausilva.com/wp-content/gallery/eclipseintellisense/thumbs/thumbs_eclipse-variable.png" /></a></p>
<p>Follow the below steps to achieve this in Eclipse:</p>
<ul>
<li>Eclipse (or Window in Windows) -&gt; Preferences -&gt; Java -&gt; Editor -&gt; Content Assist</li>
<li><a class="shutterset_" title="" href="http://esausilva.com/wp-content/gallery/eclipseintellisense/contentassist-eclipse.png"><img class="ngg-singlepic ngg-none" alt="contentassist-eclipse" src="http://esausilva.com/wp-content/gallery/eclipseintellisense/thumbs/thumbs_contentassist-eclipse.png" /></a></li>
<li>Set <em>Auto activation delay</em> to 0</li>
<li>Set <em>Auto activation triggers for Java</em> to ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz =.(!+-*/~,[{@#$%^&amp;</li>
</ul>
<p>Happy Coding <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2013/05/13/intellisense-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install updates in Fedora Linux</title>
		<link>http://esausilva.com/2013/04/05/how-to-install-updates-in-fedora-linux/</link>
		<comments>http://esausilva.com/2013/04/05/how-to-install-updates-in-fedora-linux/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 22:55:18 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[f18]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=771</guid>
		<description><![CDATA[You can check and install updates in Fedora Linux using the Software app or thru command line. Personally I like command line better since is faster and less trouble some than having to go thru Software. Thru Software Open Software lick on its name (pic below) A new window will open and just click in]]></description>
				<content:encoded><![CDATA[
<p>You can check and install updates in Fedora Linux using the <em>Software</em> app or thru command line. Personally I like command line better since is faster and less trouble some than having to go thru <em>Software</em>.</p>
<p><span id="more-771"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><strong>Thru <em>Software</em></strong></p>
<ol>
<ol>
<li>Open <em>Software</em></li>
<li>lick on its name (pic below)</li>
</ol>
</ol>
<p><a class="shutterset_" title="" href="http://esausilva.com/wp-content/gallery/misc/fedoraupdates.png"><img class="ngg-singlepic ngg-none" alt="fedoraupdates" src="http://esausilva.com/wp-content/gallery/misc/thumbs/thumbs_fedoraupdates.png" /></a></p>
<ol>
<ol>
<li>A new window will open and just click in <em>Install Updates</em> button</li>
</ol>
</ol>
<p><a class="shutterset_" title="" href="http://esausilva.com/wp-content/gallery/misc/fedoraupdates2.png"><img class="ngg-singlepic ngg-none" alt="fedoraupdates2" src="http://esausilva.com/wp-content/gallery/misc/thumbs/thumbs_fedoraupdates2.png" /></a></p>
<p><strong>Thru <em>Terminal</em></strong></p>
<ol>
<ol>
<li>Open <em>Terminal</em></li>
<li>Type to check for updates and if there are nay updates a list of packages will display:</li>
</ol>
</ol>
<pre class="brush: bash; gutter: true; title: readme.txt; notranslate">
$ yum check-update
</pre>
<ol>
<ol>
<li>To actually install the updates type:</li>
</ol>
</ol>
<pre class="brush: bash; gutter: true; title: readme.txt; notranslate">
sudo yum update
</pre>
<ol>
<li>Type your password</li>
<li>Once it finishes checking available updates it will ask you if you want to install them, just type <em>y</em></li>
</ol>
<p>And that is it, you will have everything up to date <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Have a nice one</p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 2 - Bottom Post */
google_ad_slot = "6598978286";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2013/04/05/how-to-install-updates-in-fedora-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleaning Up GNU GRUB</title>
		<link>http://esausilva.com/2013/03/20/cleaning-up-gnu-grub/</link>
		<comments>http://esausilva.com/2013/03/20/cleaning-up-gnu-grub/#comments</comments>
		<pubDate>Wed, 20 Mar 2013 22:07:19 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Grub]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=449</guid>
		<description><![CDATA[I had Fedora 17 installed and decided to upgrade to Fedora 18, upon upgrading I noticed in GRUB menu options Fedora 17 was still listed. As a good and organized computer user, I started looking and asking how to clean this messy looking GRUB and found the solution. This is how my GRUB menu looked]]></description>
				<content:encoded><![CDATA[
<p>I had Fedora 17 installed and decided to upgrade to Fedora 18, upon upgrading I noticed in GRUB menu options Fedora 17 was still listed. As a good and organized computer user, I started looking and asking how to clean this messy looking GRUB and found the solution.</p>
<p>This is how my GRUB menu looked like after the upgrade:</p>
<p><a class="shutterset_" href='http://esausilva.com/wp-content/gallery/misc/grub_blog.jpg' title=''><img src='http://esausilva.com/wp-content/gallery/misc/thumbs/thumbs_grub_blog.jpg' alt='grub_blog' class='ngg-singlepic ngg-none' /></a><br />
<span id="more-449"></span></p>
<p>And below is the command to clean GRUB, run it in terminal and next time you turn on your system, GRUB will display only the correct OS list.</p>
<pre class="brush: bash; title: ; notranslate"> su -c &quot;package-cleanup --oldkernels --count=1&quot;</pre>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>&nbsp;</p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2013/03/20/cleaning-up-gnu-grub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wait For Trigger File &#8211; Unix Shell Snippet</title>
		<link>http://esausilva.com/2012/10/23/wait-for-trigger-file-unix-shell-snippet/</link>
		<comments>http://esausilva.com/2012/10/23/wait-for-trigger-file-unix-shell-snippet/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 02:52:52 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[trigger]]></category>
		<category><![CDATA[TriggerFile]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[WaitForTriggerFile]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=361</guid>
		<description><![CDATA[So recently I was doing doing some bash scripting and required a functionality that would allow my script to wait for for a trigger file in order to execute. After some thinking, I was able to some up with a function to perform the required action. Basically, how this works is that a function will]]></description>
				<content:encoded><![CDATA[
<p>So recently I was doing doing some bash scripting and required a functionality that would allow my script to wait for for a trigger file in order to execute. After some thinking, I was able to some up with a function to perform the required action. </p>
<p>Basically, how this works is that a function will be looping constantly looking in a specific directory for a specific file to arrive, the function will loop &#8216;n&#8217; times looking for that specific trigger file, sleeping &#8216;n&#8217; seconds in between tries. Once found, it fires off the next portion of the script (or a separate script). If the file is not found in &#8216;n&#8217; times, then will exit with an exit code of 1. You can also set it so it will keep looking for the trigger file indefinitely.</p>
<p>This snippet will also send an email if the trigger file is not found in &#8216;n&#8217; times.</p>
<p>Code after the jump.<br />
<span id="more-361"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: bash; gutter: true; title: waitForTriggerFile.sh; toolbar: true; notranslate">

#!/bin/bash
########################################################################################################
# Snippet that waits for a trigger file
########################################################################################################

# Script that will send an email
. sendEmail.sh

waitForTriggerFile() {
	TRIGGERFILE=$1
	SLEEPTIME=$2
	MAXTRIES=$3
	
	# Variables used to send an email
	SUBJECT=&quot;Trigger File Not Found&quot;
	EMAIL=&quot;$4&quot;
	EMAILMESSAGE=&quot;mailMessage.txt&quot;

	if [[ ! -f $TRIGGERFILE ]]; then
		count=0
		while [[ ! -e $TRIGGERFILE ]]; do
			let count=count+1
			if [[ $count == $MAXTRIES ]]; then
				# Sends an email if can't file trigger file in 'n' times
				sendMail $SUBJECT $EMAIL $EMAILMESSAGE
				exit 1
			fi
			echo &quot;Will check again in $SLEEPTIME seconds&quot;
			sleep $SLEEPTIME
		done
		# Execute another script
	fi
	# Execute another script
}

</pre>
<p>In above code &#8216;sendMail&#8217; is a function in &#8216;sendMail.sh&#8217; that accepts three arguments: subject, email, and a text file for the email message. You can view the snippet here: <a href="http://esausilva.com/2012/10/23/how-to-send-email-unix-shell-snippet">send email snippet</a></p>
<p>Hope this was helpful to you&#8230;</p>
<p>Share this article <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 2 - Bottom Post */
google_ad_slot = "6598978286";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2012/10/23/wait-for-trigger-file-unix-shell-snippet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Send Email &#8211;  Unix Shell Snippet</title>
		<link>http://esausilva.com/2012/10/23/how-to-send-email-unix-shell-snippet/</link>
		<comments>http://esausilva.com/2012/10/23/how-to-send-email-unix-shell-snippet/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 02:49:17 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[SendEmail]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=364</guid>
		<description><![CDATA[I&#8217;m sharing two code snippets that will send an email. These snippets accept three parameters: a subject, an email address and a text file containing the email message. Code after the jump. Version 1: Version 2: My &#8216;mail&#8217; tool is located &#8216;/usr/bin/mail&#8217;, but if yours is in a different location, change the path. Hope this]]></description>
				<content:encoded><![CDATA[
<p>I&#8217;m sharing two code snippets that will send an email. These snippets accept three parameters: a subject, an email address and a text file containing the email message.</p>
<p>Code after the jump.<br />
<span id="more-364"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Version 1:</p>
<pre class="brush: bash; gutter: true; title: sendEmail_V1.sh; toolbar: true; notranslate">

#!/bin/bash
########################################################################################################
# Snippet that send an email
########################################################################################################

sendMail() {
	SUBJECT=$1
	EMAIL=$2
	EMAILMESSAGE=$3
	
	/usr/bin/mail -s &quot;$SUBJECT&quot; &quot;$EMAIL&quot; &lt; $EMAILMESSAGE
}

</pre>
<p>Version 2:</p>
<pre class="brush: bash; gutter: true; title: sendEmail_V1.sh; toolbar: true; notranslate">

#!/bin/bash
########################################################################################################
# Snippet that send an email
########################################################################################################

sendMail() {
	SUBJECT=$1
	EMAIL=$2
	EMAILMESSAGE=$3
	
	cat $EMAILMESSAGE | /usr/bin/mail -s &quot;$SUBJECT&quot; $EMAIL
}

</pre>
<p>My &#8216;mail&#8217; tool is located &#8216;/usr/bin/mail&#8217;, but if yours is in a different location, change the path.</p>
<p>Hope this was helpful to you&#8230;</p>
<p>Share this article <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2012/10/23/how-to-send-email-unix-shell-snippet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>bulkGetter &#8211; A Script Wrapped Around wget</title>
		<link>http://esausilva.com/2012/10/20/bulkgetter-a-script-wrapped-around-wget/</link>
		<comments>http://esausilva.com/2012/10/20/bulkgetter-a-script-wrapped-around-wget/#comments</comments>
		<pubDate>Sun, 21 Oct 2012 02:21:01 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bulkgetter]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=286</guid>
		<description><![CDATA[Basically bulkGetter functions as a downloading command line tool accepting an input file as a feed with the desired link(s) to download. It can download files, save them to a specified location and rename them. For this tool to work, you need to have &#8216;wget&#8217; tool, if you have Linux, more than likely is already]]></description>
				<content:encoded><![CDATA[
<p>Basically bulkGetter functions as a downloading command line tool accepting an input file as a feed with the desired link(s) to download. It can download files, save them to a specified location and rename them.</p>
<p>For this tool to work, you need to have &#8216;wget&#8217; tool, if you have Linux, more than likely is already included in your distribution. If you have OSX, then you need to download it, the only thing is that you have to compile it. <a href="http://www.gnu.org/software/wget/" target="_blank">Get wget</a>. If you do not wanna go thru the hassle of compilation, then you can download my compiled version that I have provided with <a href="http://esausilva.com/wp-content/plugins/cimy-counter/cc_redirect.php?cc=bulkgetter&#038;fn=http://esausilva.com/blogfiles/bulkGetter.zip">bulkGetter</a>.<br />
<span id="more-286"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>If running OSX, like me, after you download wget, you need to include it in the PATH variable and make it executable. If by any reason you do not know what the PATH variable is, you can read what it is here: <a href="http://www.cs.purdue.edu/homes/cs348/unix_path.html" target="_blank">PATH Variable</a>.</p>
<p>My tool can be used in four different ways. Below is the basic usage:</p>
<pre class="brush: bash; gutter: true; title: readme.txt; notranslate">
# Usage: ./bulkGetter.sh inputFile saveToPath [-rs | -rb | -rm] [newFileName]
#  -rs	--rename single file
#  -rb	--rename multiple files
#  -rm	--rename files in bulk with multiple names
</pre>
<p>This tool is very specific. First argument must be your input file, second argument the path where you want your files saved, third argument can be either &#8216;-rs&#8217;, &#8216;-rb&#8217; or &#8216;-rm&#8217;, and fourth argument the new file name for your file; arguments three and four are optional. For more usage information please refer to file &#8216;readme.txt&#8217; included in bulkGetter.zip at the end of this post. Running the script without any options, will display its usage.</p>
<p>Also, with every option, a different input file is required. You can download bulkGetter.zip at the end of this post, which includes sample input files.</p>
<p><strong>Update 20130323:</strong> bulkGetter now version 0.02 uses a proxy server and user agent string by default. If you do not want to use them, just use bulkGetter 0.01 (included in bulkGetter.zip) or delete them from the v0.02.</p>
<p>And below is the code. (Click &#8216;Show Source&#8217; to expand)</p>
<pre class="brush: bash; gutter: true; title: bilkGetter-0.02.sh; toolbar: true; notranslate">

#!/bin/bash
########################################################################################################
# Simple script that uses wget to retreive internet files from a given input file. The script has four
# options that accept three different type of input files depending if you want to rename the downloaded
# files or not. Refer to 'readme.txt' for more usage information.
#
# Author: Esau Silva (jgezau)
# Version: 0.02
#
# wget used options
# -t0						--unlimited number of tries
# -c						--resume broken downloads
# -np						--do not ascend to the parent directory
# -P						--save files to a specific directory
# -O						--rename the downloded file
# --execute=http_proxy=		--hides wget behind a proxy server
# --user-agent=				--mask user agent and display wget like browser
#
# ** Change History **
# User		Date		Description
# jgezau	20121020	Initial coding
# jgezau	20121030	Added wrapping quotation marks (&quot;&quot;) to saveTo when creating directory
# jgezau	20121219	Added &quot;-p&quot; to make directory structure that is several directories deep
# jgezau	20130110	Changed IFS from ',' to ';'
# jgezau	20130323	Added public proxy server support w/o password
#						Added user agent support to mask wget like a browser
#						Added 5 sec delay between each download when -rb or -rm is used
########################################################################################################

# Variables
inFile=$1
saveTo=$2
renameOption=$3
newFileName=$4
userAgent=&quot;&quot;	# read &quot;NOTE 2&quot; in readme.txt
proxyServer=&quot;&quot;	# read &quot;NOTE 2&quot; in readme.txt
sleeping=5

# Flags
good2go=0
changeIFS=0
noRename=0
rename=0

# Displays usage when script is ran w/o arguments
if [[ $# -eq 0 ]]; then
	echo -e &quot;\t Usage: ./bulkGetter.sh inputFile saveToPath [-rs | -rb | -rm] [newFileName]&quot;
	echo -e &quot;\t	-rs	--rename single file&quot;
	echo -e &quot;\t	-rb	--rename files in bulk&quot;
	echo -e &quot;\t	-rm	--rename files in bulk with multiple names&quot;
	exit
fi

# Check if input file exists
if [[ ! -f $inFile ]]; then
	echo -e &quot;\t '$inFile' does not exist&quot;
	echo -e &quot;\t Now exiting script&quot;
	exit
fi

# Check for correct arguments
if [[ $# -eq 4 ]]; then
	if [[ $renameOption != &quot;-rs&quot; &amp;&amp; $renameOption != &quot;-rb&quot; ]]; then
		echo -e &quot;\tArgument three needs to be '-rs', '-rb' or '-rm'&quot;
		echo -e &quot;\tRun script w/o arguments for usage information...Now exiting script&quot;
		exit 1
	fi
	good2go=1
	rename=1
elif [[ $# -eq 2 ]]; then
	good2go=1
	noRename=1
elif [[ $# -eq 3 ]]; then
	if [[ $renameOption == &quot;-rm&quot; ]]; then
		changeIFS=1
		good2go=1
		rename=1
	else
		echo -e &quot;\tYou need one more argument.&quot;
		echo -e &quot;\tRun script w/o arguments for usage information...Now exiting script&quot;
		exit 1
	fi
elif [[ $# -gt 4 || $# -eq 1 ]]; then
	echo -e &quot;\tbulkGetter accepts either 2 or 4 arguments.&quot;
	echo -e &quot;\tRun script w/o arguments for usage information...Now exiting script&quot;
	exit 1
fi

# Perform bulkGetter's job
if [[ $good2go -eq 1 ]]; then
	
	# If destination directory does not exists, create it
	if [[ ! -d &quot;$saveTo&quot; ]]; then
		mkdir -p &quot;$saveTo&quot;
	fi
	
	# No Rename Files
	if [[ $noRename -eq 1 ]]; then
		for url in $(cat $inFile); do
			wget -t10 -c -np --execute=http_proxy=&quot;$proxyServer&quot; -P &quot;$saveTo&quot; --user-agent=&quot;${userAgent}&quot; &quot;$url&quot;
		done
	
	# Rename Files
	elif [[ $rename -eq 1 ]]; then 
		
		# Rename single file
		if [[ $renameOption == &quot;-rs&quot; ]]; then
			url=$(cat $inFile)
			fileExt=$(echo &quot;$url&quot; | awk -F. '{if (NF&gt;1) {print $NF}}')
			wget -t10 -c -np --execute=http_proxy=&quot;$proxyServer&quot; -O &quot;${saveTo}/${newFileName}.${fileExt}&quot; --user-agent=&quot;$userAgent&quot; &quot;$url&quot;
		
		# Rename files in bulk   
		elif [[ $renameOption == &quot;-rb&quot; ]]; then
			part=1
			for url in $(cat $inFile); do
				fileExt=$(echo &quot;$url&quot; | awk -F. '{if (NF&gt;1) {print $NF}}')
				wget -t10 -c -np --execute=http_proxy=&quot;$proxyServer&quot; -O &quot;${saveTo}/${newFileName} ${part}.${fileExt}&quot; --user-agent=&quot;${userAgent}&quot; &quot;$url&quot;
				sleep $sleeping
				(( part++ ))
			done
		
		# Rename files in bulk with multiple names
		elif [[ $renameOption == &quot;-rm&quot; ]]; then
			
			# Change IFS to ';'
			OLDIFS=$IFS
			IFS=';'
			
			inOneLiner=$(cat $inFile | sed 's:$:;:' | tr -d '\n' | sed 's:;$::')

			# Adding URL and New FileName to an array
			count=1
			for line in $inOneLiner; do
				isOdd=$(( $count % 2 ))
				if [[ $isOdd -eq 1 ]]; then
					url[$count]=$line
				else
					file[$count]=$line
				fi
				(( count++ ))
			done
			
			# Change IFS back to default
			IFS=$OLDIFS

			count2=1
			for (( i = 1; i &lt; $count; i++ )); do
				fileExt=$(echo &quot;${url[$i]}&quot; | awk -F. '{if (NF&gt;1) {print $NF}}')
				wget -t10 -c -np --execute=http_proxy=&quot;$proxyServer&quot; -O &quot;${saveTo}/${file[$i+1]}.${fileExt}&quot; --user-agent=&quot;${userAgent}&quot; &quot;${url[$i]}&quot;
				sleep $sleeping
				(( count2++ ))
				(( i++ ))
			done
		fi
	fi
fi

</pre>
<p>For your convenience, I have ziped this script with wget utility and some sample input files. Get <a href="http://esausilva.com/wp-content/plugins/cimy-counter/cc_redirect.php?cc=bulkgetter&#038;fn=http://esausilva.com/blogfiles/bulkGetter.zip">bulkGetter</a></p>
<p><a href="http://esausilva.com/wp-content/plugins/cimy-counter/cc_redirect.php?cc=bulkgetter&#038;fn=http://esausilva.com/blogfiles/bulkGetter.zip">bulkGetter.zip</a> includes the below files:</p>
<ul>
<li>bulkGetter-0.01.sh</li>
<li>bulkGetter-0.02.sh</li>
<li>inputRS.txt</li>
<li>inputRB.txt</li>
<li>inputRM.txt</li>
<li>wget</li>
<li>readme.txt</li>
</ul>
<p>You are more than welcomed to download the script and use it/modify it in any way you might think posible, just one thing I ask, please do not remove my credit <img src='http://esausilva.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you have any suggestions as to improving bulkGetter, you can post it below and I might consider it, for the time being, this satisfies my needs <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p><strong>Update 20121030:</strong> I had left out enclosing quotation marks (&#8220;&#8221;) to &#8220;$saveTo&#8221; variable when creating a new directory, therefore script was failing if new directory had spaces on it. All is good now <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<strong>Update 20121219:</strong> Added &#8220;-p&#8221; to mkdir to make directory structure that is several directories deep<br />
<strong>Update 20130110:</strong> Changed IFS from &#8216;,&#8217; to &#8216;;&#8217;<br />
<strong>Update 20130323:</strong> Added public proxy server support w/o password; Added user agent support to mask wget like a browser; Added 5 sec delay between each download when -rb or -rm is used</p>
<p>Share if you liked this article&#8230;</p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 2 - Bottom Post */
google_ad_slot = "6598978286";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2012/10/20/bulkgetter-a-script-wrapped-around-wget/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Tune an Acoustic Guitar</title>
		<link>http://esausilva.com/2011/01/07/how-to-tune-an-acoustic-guitar/</link>
		<comments>http://esausilva.com/2011/01/07/how-to-tune-an-acoustic-guitar/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 20:39:53 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Guitar Tuning]]></category>
		<category><![CDATA[KORG tuner]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=251</guid>
		<description><![CDATA[Procedure that teaches a beginner how to tune an acoustic guitar using an electronic tuner. This must be done before playing the guitar to ensure a clear sound. Needed Acoustic guitar Electronic tuner KORG Guitar/Bass tuner GA-30 used in the instructions or &#8220;gStrings Free&#8221; app in the Android Market Parts of the guitar Electronic tuner]]></description>
				<content:encoded><![CDATA[
<p>Procedure that teaches a beginner how to tune an acoustic guitar using an electronic tuner. This must be done before playing the guitar to ensure a clear sound.</p>
<p><strong>Needed</strong></p>
<ul>
<li>Acoustic guitar</li>
<li>Electronic tuner
<ul>
<li>KORG Guitar/Bass tuner GA-30 used in the instructions</li>
</ul>
</li>
<li>or &#8220;gStrings Free&#8221; app in the Android Market</li>
</ul>
<p><span id="more-251"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><strong>Parts of the guitar</strong></p>

<a href="http://esausilva.com/wp-content/gallery/tuning-an-acoustic-guitar/screen-shot-2011-01-07-at-1-45-36-pm.png" title="" class="shutterset_singlepic1056" >
	<img class="ngg-singlepic" src="http://esausilva.com/wp-content/gallery/cache/1056__523x558_screen-shot-2011-01-07-at-1-45-36-pm.png" alt="screen-shot-2011-01-07-at-1-45-36-pm" title="screen-shot-2011-01-07-at-1-45-36-pm" />
</a>

<p><strong>Electronic tuner</strong></p>
<ol>
<li>Make sure tuner is set to guitar not bass
<ul>
<li><span style="text-decoration: underline;">Note</span>: If tuner is set to bass, press <em>Guitar/Bass</em> button to change</li>
</ul>
<p>
<a href="http://esausilva.com/wp-content/gallery/tuning-an-acoustic-guitar/screen-shot-2011-01-07-at-1-52-35-pm.png" title="" class="shutterset_singlepic1061" >
	<img class="ngg-singlepic" src="http://esausilva.com/wp-content/gallery/cache/1061__306x206_screen-shot-2011-01-07-at-1-52-35-pm.png" alt="screen-shot-2011-01-07-at-1-52-35-pm" title="screen-shot-2011-01-07-at-1-52-35-pm" />
</a>
</li>
<li>Place tuner close to guitar<br />

<a href="http://esausilva.com/wp-content/gallery/tuning-an-acoustic-guitar/screen-shot-2011-01-07-at-1-52-47-pm.png" title="" class="shutterset_singlepic1062" >
	<img class="ngg-singlepic" src="http://esausilva.com/wp-content/gallery/cache/1062__306x206_screen-shot-2011-01-07-at-1-52-47-pm.png" alt="screen-shot-2011-01-07-at-1-52-47-pm" title="screen-shot-2011-01-07-at-1-52-47-pm" />
</a>
</li>
<li>Pluck 6th string and check for green light in electronic tuner
<ul>
<li>Line must be close to center</li>
<li>If the line is to the left turn tuning key E clockwise</li>
<li>If the line is to the right turn tuning key E counterclockwise</li>
</ul>
<p>
<a href="http://esausilva.com/wp-content/gallery/tuning-an-acoustic-guitar/screen-shot-2011-01-07-at-1-52-57-pm.png" title="" class="shutterset_singlepic1063" >
	<img class="ngg-singlepic" src="http://esausilva.com/wp-content/gallery/cache/1063__306x206_screen-shot-2011-01-07-at-1-52-57-pm.png" alt="screen-shot-2011-01-07-at-1-52-57-pm" title="screen-shot-2011-01-07-at-1-52-57-pm" />
</a>
</li>
<li>When tuning, make sure <span style="text-decoration: underline;">number</span> and <span style="text-decoration: underline;">tuning letter</span> in the top left corner match to the string currently plucking
<ul>
<li>If plucking 6th string, it should read 6E, 5th string should read 5A, and so on</li>
<li>Turn tuning keys clockwise or counterclockwise as needed in order to get the right combination</li>
</ul>
<p>
<a href="http://esausilva.com/wp-content/gallery/tuning-an-acoustic-guitar/screen-shot-2011-01-07-at-1-53-04-pm.png" title="" class="shutterset_singlepic1064" >
	<img class="ngg-singlepic" src="http://esausilva.com/wp-content/gallery/cache/1064__306x206_screen-shot-2011-01-07-at-1-53-04-pm.png" alt="screen-shot-2011-01-07-at-1-53-04-pm" title="screen-shot-2011-01-07-at-1-53-04-pm" />
</a>
</li>
<li>Pluck 5th string and check for green light in electronic tuner
<ul>
<li>Line must be close to center</li>
<li>If the line is to the left turn tuning key A clockwise</li>
<li>If the line is to the right turn tuning key A counterclockwise</li>
</ul>
</li>
<li>Pluck 4th string and check for green light in electronic tuner
<ul>
<li>Line must be close to center</li>
<li>If the line is to the left turn tuning key D clockwise</li>
<li>If the line is to the right turn tuning key D counterclockwise</li>
</ul>
</li>
<li>Pluck 3rd string and check for green light in electronic tuner
<ul>
<li>Line must be close to center</li>
<li>If the line is to the left turn tuning key G clockwise</li>
<li>If the line is to the right turn tuning key G counterclockwise</li>
</ul>
</li>
<li>Pluck 2nd string and check for green light in electronic tuner
<ul>
<li>Line must be close to center</li>
<li>If the line is to the left turn tuning key B clockwise</li>
<li>If the line is to the right turn tuning key B counterclockwise</li>
</ul>
</li>
<li>Pluck 1th string and check for green light in electronic tuner
<ul>
<li>Line must be close to center</li>
<li>If the line is to the left turn tuning key E clockwise</li>
<li>If the line is to the right turn tuning key E counterclockwise</li>
</ul>
</li>
<li>Turn off electronic tuner and put it away</li>
</ol>
<p><strong>gStrings Free app</strong></p>
<p>Tuning with gStrings Free app in the Adnroid Market is pretty much the same.</p>
<ol>
<li>Tap Auto Tune button<br />

<a href="http://esausilva.com/wp-content/gallery/tuning-an-acoustic-guitar/snap20110107_142008.png" title="" class="shutterset_singlepic1066" >
	<img class="ngg-singlepic" src="http://esausilva.com/wp-content/gallery/cache/1066__240x400_snap20110107_142008.png" alt="snap20110107_142008" title="snap20110107_142008" />
</a>
</li>
<li>Pluck 6th string and check for line to be centered
<ul>
<li>Line must be close to center</li>
<li>If the line is to the left turn tuning key E clockwise</li>
<li>If the line is to the right turn tuning key E counterclockwise</li>
</ul>
<p>
<a href="http://esausilva.com/wp-content/gallery/tuning-an-acoustic-guitar/snap20110107_141847.png" title="" class="shutterset_singlepic1065" >
	<img class="ngg-singlepic" src="http://esausilva.com/wp-content/gallery/cache/1065__240x400_snap20110107_141847.png" alt="snap20110107_141847" title="snap20110107_141847" />
</a>
</li>
<li>Do the same for the rest of the strings</li>
<li>When done, tap Stop Tuning</li>
</ol>
<p>Now you should have a tuned guitar and ready to jam!</p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 2 - Bottom Post */
google_ad_slot = "6598978286";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2011/01/07/how-to-tune-an-acoustic-guitar/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Calibrate the Phone&#8217;s Battery After Flashing a new ROM or Kernel</title>
		<link>http://esausilva.com/2011/01/01/how-to-calibrate-the-phones-battery-after-flashing-a-new-rom-or-kernel/</link>
		<comments>http://esausilva.com/2011/01/01/how-to-calibrate-the-phones-battery-after-flashing-a-new-rom-or-kernel/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 20:56:28 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Battery Life]]></category>
		<category><![CDATA[Calibrate Battery]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[rom]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=234</guid>
		<description><![CDATA[If you are like me, changing roms very often, you will find yourself calibrating your phone&#8217;s battery very often. I remember the first rom I flashed back when I had my Sprint Hero, battery life was terrible after flashing it, and since I was a n00b back then, I did not know that I had]]></description>
				<content:encoded><![CDATA[
<p>If you are like me, changing roms very often, you will find yourself calibrating your phone&#8217;s battery very often. I remember the first rom I flashed back when I had my Sprint Hero, battery life was terrible after flashing it, and since I was a n00b back then, I did not know that I had to calibrate my phone&#8217;s battery. After some research, I was able to find out that I needed to calibrate the battery and the how-to thread.</p>
<p><span id="more-234"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Our smart phones have Li-Ion batteries, they do not have a memory, therefore by saying &#8220;calibrating battery&#8221; we mean calibrating how Android reads the battery. When flashing a new ROM or Kernel, Android may read the battery as full, when in reality is not full and by calibrating the battery, we make sure Android reads the battery properly. This being said, while reading the XDA Forums I stumbled upon a good write out of three methods on how to calibrate our phones batteries.</p>
<p>You have to go into Recovery Mode First</p>
<ol>
<li>Power off phone or pull battery and replace.</li>
<li>Hold all three of these buttons down: Vol-Down, Camera button (lower left as you look at the phone) and Power on button. (This combination is for the Epic 4G, other phones have other key combinations)</li>
<li>You will see a small graphical menu come up. Most of us are using Clockwork, so I will focus on that &#8211; it will be a green menu.</li>
</ol>
<p><br/><br />
<strong>Method 1 &#8211; The Drain Way</strong></p>
<ol>
<li>Drain it down until fully dead.</li>
<li>Charge normally to full.</li>
<li>Reboot to Clockwork recovery and wipe battery stats (under advanced, on second page), reboot phone.</li>
<li>Turn everything on, flashlight, Bluetooth, Wi-Fi, Pandora, the whole nine, to quickly drain it completely dead.</li>
<li>Charge normally to full.</li>
</ol>
<p><br/><br />
<strong>Method 2 &#8211; The Powered Off Charge way</strong></p>
<ol>
<li>Charge your phone 100% while it’s on.</li>
<li>Unplug it from the charger, power off, then charge it up to 100% with it in a powered off state.</li>
<li>Unplug charger from phone. Power it on, and then charge it to 100% while the phone is on.</li>
<li>Unplug the charger and then reboot into Clockwork, go to advanced and clear the battery stats.</li>
<li>Power on, charge to full, and then enjoy.</li>
</ol>
<p><br/><br />
<strong>Method 3 &#8211;  Mr. Miagi Charge way</strong></p>
<p>Maybe we can call it the Mr. Miagi Charge way&#8230;.aka Power On, Power Off, Charge On, Charge Off way lol</p>
<p>(the parentheses are the state of the phone)</p>
<ol>
<li>Start with the phone powered on.</li>
<li>(Phone on) Charge battery until the LED turns blue</li>
<li>(Phone on) Unplug the phone from the charger, wait until the LED turns off</li>
<li>Power off the phone.</li>
<li>(Phone off) Plug the adapter into the phone, charge it up until the LED turns blue</li>
<li>(Phone off) Unplug, wait until the LED turns off</li>
<li>Power the phone on.</li>
<li>Wait until the phone is booted back up all the way, and then power it off again</li>
<li>(Phone off) Plug the adapter into the phone, charge it up until the LED turns blue.</li>
<li>Boot the phone into recovery mode</li>
<li>Go to Advanced, and then choose Wipe Battery Stats.</li>
<li>Power the phone on and use normally.</li>
</ol>
<p><br/></p>
<p><strong>NOTE:</strong> I did not come up with these methods, just reposting it from the XDA Forums: <a href="http://forum.xda-developers.com/showthread.php?t=884684" target="_blank"> Calibrate Battery thread &#8211; This is how you do it!</a></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 2 - Bottom Post */
google_ad_slot = "6598978286";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2011/01/01/how-to-calibrate-the-phones-battery-after-flashing-a-new-rom-or-kernel/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Mac OS X Not Recognizing Galaxy S Phones</title>
		<link>http://esausilva.com/2010/12/02/mac-os-x-not-recognizing-galaxy-s-phones/</link>
		<comments>http://esausilva.com/2010/12/02/mac-os-x-not-recognizing-galaxy-s-phones/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 01:28:26 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Captivate]]></category>
		<category><![CDATA[Epic4G]]></category>
		<category><![CDATA[Fascinate]]></category>
		<category><![CDATA[Galaxy S]]></category>
		<category><![CDATA[GalaxyS]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Samsung]]></category>
		<category><![CDATA[Vibrant]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=212</guid>
		<description><![CDATA[When I bought my Galaxy S phone (Sprint Epic 4G) I was really excited about the phone until I connected it to my Mac, to my surprise, OSX wouldn&#8217;t recognize the phone, so Mounting the phone as USB Mass Storage was of no use, nor trying to connect it thru ADB; I was very disappointed.]]></description>
				<content:encoded><![CDATA[
<p>When I bought my Galaxy S phone (Sprint Epic 4G) I was really excited about the phone until I connected it to my Mac, to my surprise, OSX wouldn&#8217;t recognize the phone, so Mounting the phone as USB Mass Storage was of no use, nor trying to connect it thru ADB; I was very disappointed. I rushed to Google trying to find an answer and to my surprise, I wasn&#8217;t the only one having the same problem, some people were able to connect for a couple of seconds then OSX would kick them out of the system, some others wouldn&#8217;t connect at all, and some other ones connected just fine. Digging deeper I found several solutions:</p>
<p><span id="more-212"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<ul>
<li>Make sure you have USB Debugging turned on in your phone (/Settings/Applications/Development/USB Debugging)</li>
<li>Try restarting the phone and changing USB ports</li>
<li>Try a different USB cable, the one out of the box is not so good</li>
<li><strong>Try connecting the phone thru a powered USB Hub</strong></li>
</ul>
<p>Since I did not want to buy an expensive powered USB Hub, I tried the first three choices with no luck. First, I bought two USB cables, one from RadioShack and the other one from Sprint Store, neither worked, the only one that has worked is the one provided, but just for a couple of seconds, then OSX would kicks me out of the system.</p>
<p>So I decided to buy a powered USB Hub, but instead of buying an expensive one from BestBuy, I went to eBay (my favorite site) and got myself a cheap, 10 bucks, one. When I plugged my phone through it, daaang, worked at firat try, amazing!!! I was pleased. So if you have a 5th gen Mac and a Galaxy S phone, chances are you will be needing a Powered USB Hub.</p>
<p>On a side note, it seems that either the Mac or the phone requires more power for some reason, weird cause works perfectly fine on a Windows box.</p>
<p>If you found my post useful, please re-tweet/Share/FaceBook Like button. <img src='http://esausilva.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2010/12/02/mac-os-x-not-recognizing-galaxy-s-phones/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to set up ADB (Android Debug Bridge) in Mac OSX</title>
		<link>http://esausilva.com/2010/10/02/how-to-set-up-adb-android-debug-bridge-in-mac-osx/</link>
		<comments>http://esausilva.com/2010/10/02/how-to-set-up-adb-android-debug-bridge-in-mac-osx/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 20:23:58 +0000</pubDate>
		<dc:creator>jgezau</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[Galaxy S]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://esausilva.com/?p=192</guid>
		<description><![CDATA[I have seen many questions regarding the set up of ADB under Mac OSX, and when I got myself a MBP I had the same question. After some research, I was able to find that is not as complicated as I thought it would be; it&#8217;s actually less of a hassle than setting it up]]></description>
				<content:encoded><![CDATA[
<p>I have seen many questions regarding the set up of ADB under Mac OSX, and when I got myself a MBP I had the same question. After some research, I was able to find that is not as complicated as I thought it would be; it&#8217;s actually less of a hassle than setting it up under Windows or Linux. In OSX, ADB just works, as simple as that.</p>
<p>What is ADB?<br />
ADB (Android Debug Bridge) is a handy tool that comes with Android SDK that allows you to control and interface with your Android device.</p>
<p><strong>IMPORTANT Update</strong> 12/11/10 &#8211; There has been a change to the new Android SDK. ADB Tool has been moved to /android-sdk-mac_86/plataform-tools,  so if you have the old SDK, please download the new one and update your path (Step 4.5 of this tutorial). If this is your first time doing this, then disregard the update and continue with the tutorial.<br />
<span id="more-192"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 1 - Top Post */
google_ad_slot = "9163995085";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><strong>Update:</strong> 10/14/10 &#8211; There are issues connecting Galaxy S phones with newer Macs. Go to the end of the tutorial to see possible solutions.<br />
<strong>Update:</strong> 10/22/10 &#8211; Found solution for Galaxy S phones with newer Macs.</p>
<p><strong>The How To</strong></p>
<ol>
<li>Download the latest Android SDK from Google: <a href="http://developer.android.com/sdk/index.html" target="_blank">Android SDK</a></li>
<li>Extract the ZIP file to your desired location</li>
<li>To get ADB, you need to install the SDK: <a href="http://developer.android.com/sdk/installing.html" target="_blank">Installing the SDK</a>
<ul>
<li>If you are not a developer and not planning to develop, then just download the following zip file containing only the ADB tool and proceed with the tutorial: <a href="http://esausilva.com/wp-content/plugins/cimy-counter/cc_redirect.php?cc=platform-tools-osx&#038;fn=http://esausilva.com/misc/android/platform-tools-osx.zip">ADB</a></li>
</ul>
</li>
<li>Create an environment variable (Optional)
<ul>
<li>Open Terminal</li>
<li>Type <code class="prettyprint">cd ~</code> this will take you to your home directory</li>
<li>Type <code class="prettyprint">touch .profile</code> this will create a hidden file named <em>profile</em></li>
<li>Type <code class="prettyprint">open -e .profile</code> this will open the file you just created in TextEdit</li>
<li>In the file, type <code class="prettyprint">export PATH=${PATH}:/pathToTheAndroidSdkFolder/android-sdk-mac_86/platform-tools</code></li>
<li>Save file, close TextEdit, Quit Terminal, and Relaunch Terminal</li>
<li><span style="text-decoration: underline;">NOTE:</span> By creating an environment variable you won&#8217;t need to <code class="prettyprint">cd</code> to the Android/tools folder every time you want to run ADB</li>
</ul>
</li>
<li>You are good to go, type in terminal <code class="prettyprint">adb devices</code>, this should give you a serial number, which corresponds to your phone. Looks something like this:<br />
List of devices attached<br />
HT99PHF02521   	device</p>
<ul>
<li><span style="text-decoration: underline;">NOTE:</span> If you did not create an environment variable, then cd to the AndroidSDK/platform-tools folder, then type <code class="prettyprint">./adb devices</code></li>
<li>Also make sure you have your phone plugged in and have USB Debugging turned on (Settings &gt; Applications &gt; Development)</li>
</ul>
</li>
</ol>
<p><strong>Connecting Galaxy S phones</strong></p>
<p>A couple of days back I got a Galaxy S phone (Epic 4G) and was excited about the phone until I tried to connect it to my Mac, to my surprise, the phone wouldn&#8217;t connect, nor Mounting the phone as USB Mass Storage, nor thru ADB; I was disappointed. I rushed to Google trying to find an answer and to my surprise, I wasn&#8217;t the only one having the same problem, some people only connected for a couple of seconds then OSX would kick them out, some others wouldn&#8217;t connect al all, and some other ones connected just fine. Digging deeper I found several solutions:</p>
<ul>
<li>Make sure you have USB Debugging turned on in your phone (/Settings/Applications/Development/USB Debugging)</li>
<li>Try restarting the phone and changing USB ports</li>
<li>Try a different USB cable, the one out of the box is not so good</li>
<li><strong>Try connecting the phone thru a powered USB Hub</strong></li>
</ul>
<p>Personally, I have tried them all, <span style="text-decoration: line-through;">with the exception of the powered USB Hub, and none of them have worked</span>. I bought two USB cables, one from RadioShack and the other one from Sprint Store, neither worked, the only one that has worked is the one provided, but just for a couple of seconds, then it kicks me out. <img src='http://esausilva.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>It seems that either the Mac of the phone requires more power, so the last option (powered USB hub) seems the best one, I&#8217;ll be buying one soon and report back to you guys with the results.</p>
<p>One last note, I connected my phone to a previous generation Mac and it worked like a charm, so I guess the problem is only with newer Macs. What a bummer!!!</p>
<p><strong>Update:</strong> So I bought a cheap $10 bucks powered USB Hub from eBay, plugged my phone thru it and worked at first try, amazing!! If you have a 5th gen Mac and a Galaxy S Phone, then the solution to connect your device is thru a powered USB Hub. Happy Modding <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="text-decoration: underline;">Note</span>: This ONLY happens to Galaxy S phones, every other device should connect just fine.</p>
<p><strong>Common ADB Commands</strong></p>
<p>- Lists which devices are currently attached to your computer</p>
<pre class="brush: bash; title: ; notranslate">
adb devices
</pre>
<p>- Drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly</p>
<pre class="brush: bash; title: ; notranslate">
adb shell
</pre>
<p>- Lets you install an Android application on your phone</p>
<pre class="brush: bash; title: ; notranslate">
adb install
</pre>
<p>- Remounts your system in write mode – this lets you alter system files on your phone using ADB</p>
<pre class="brush: bash; title: ; notranslate">
adb remount
</pre>
<p>- Rets you upload files to your phones filesystem</p>
<pre class="brush: bash; title: ; notranslate">
adb push
</pre>
<p>- Lets you download files off your phones filesystem</p>
<pre class="brush: bash; title: ; notranslate">
adb pull
</pre>
<p>- Starts dumping debugging information from your handset to the console – useful for debugging your apps</p>
<pre class="brush: bash; title: ; notranslate">
adb logcat
</pre>
<p>If you liked this tutorial, please retweet and/or share <img src='http://esausilva.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-3789509522037412";
/* Leaderboard 2 - Bottom Post */
google_ad_slot = "6598978286";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

]]></content:encoded>
			<wfw:commentRss>http://esausilva.com/2010/10/02/how-to-set-up-adb-android-debug-bridge-in-mac-osx/feed/</wfw:commentRss>
		<slash:comments>69</slash:comments>
		</item>
	</channel>
</rss>
