<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>T3CH.com</title>
	
	<link>http://t3ch.com</link>
	<description>== leet technology ==</description>
	<lastBuildDate>Sun, 07 Mar 2010 23:02:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" /><atom:link rel="hub" href="http://superfeedr.com/hubbub" /><atom:link rel="hub" href="http://www.google.com/profiles/t3chcom" />		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/joet3ch" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="joet3ch" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">joet3ch</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Jailed SFTP Users With CentOS</title>
		<link>http://t3ch.com/linux/jailed-sftp-users-with-centos/</link>
		<comments>http://t3ch.com/linux/jailed-sftp-users-with-centos/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 23:02:17 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=391</guid>
		<description><![CDATA[Offering SFTP-only jailed user accounts is useful in many scenarios such as shared web hosts, storage space for friends, etc.
This tutorial is specific to CentOS 5.4 x86 64-bit.  Other flavors will vary.
** Make sure you are root or using Sudo
1.  Upgrade to OpenSSH 5.x

## fetch the packages
wget http://fs12.vsb.cz/hrb33/el5/hrb-ssh/stable/x86_64/openssh-5.1p1-3.el5.hrb.x86_64.rpm
wget http://fs12.vsb.cz/hrb33/el5/hrb-ssh/stable/x86_64/openssh-clients-5.1p1-3.el5.hrb.x86_64.rpm
wget http://fs12.vsb.cz/hrb33/el5/hrb-ssh/stable/x86_64/openssh-server-5.1p1-3.el5.hrb.x86_64.rpm

## upgrade OpenSSH
rpm -Uvh [...]]]></description>
			<content:encoded><![CDATA[<p>Offering SFTP-only jailed user accounts is useful in many scenarios such as shared web hosts, storage space for friends, etc.</p>
<p>This tutorial is specific to <b>CentOS 5.4 x86 64-bit</b>.  Other flavors will vary.</p>
<p><b>** Make sure you are root or using Sudo</b></p>
<h2>1.  Upgrade to OpenSSH 5.x</h2>
<pre class="brush: bash;">
## fetch the packages
wget http://fs12.vsb.cz/hrb33/el5/hrb-ssh/stable/x86_64/openssh-5.1p1-3.el5.hrb.x86_64.rpm
wget http://fs12.vsb.cz/hrb33/el5/hrb-ssh/stable/x86_64/openssh-clients-5.1p1-3.el5.hrb.x86_64.rpm
wget http://fs12.vsb.cz/hrb33/el5/hrb-ssh/stable/x86_64/openssh-server-5.1p1-3.el5.hrb.x86_64.rpm

## upgrade OpenSSH
rpm -Uvh openssh-*
</pre>
<h2>2.  Comment out the following line in &#8216;/etc/ssh/sshd_config&#8217;</h2>
<pre class="brush: bash;">
Subsystem     sftp     /usr/libexec/openssh/sftp-server
</pre>
<h2>3.  Append these lines to the end of &#8216;/etc/ssh/sshd_config&#8217;</h2>
<pre class="brush: bash;">
Subsystem     sftp     internal-sftp
Match Group sftponly
    ChrootDirectory /home/%u
    ForceCommand internal-sftp
    AllowTcpForwarding no
</pre>
<h2>4.  Add the &#8217;sftponly&#8217; user group</h2>
<pre class="brush: bash;">
groupadd sftponly
</pre>
<h2>5.  Modify the user&#8217;s group and shell</h2>
<p>(I&#8217;ll use the completely random username: <b>bree_olson</b>)</p>
<pre class="brush: bash;">
usermod -g sftponly bree_olson
usermod -s /bin/false bree_olson
</pre>
<h2>6.  Set the proper filesystem permissions</h2>
<p>(Bree&#8217;s home directory is <b>/home/bree_olson</b> and her website is in  <b>/home/bree_olson/public_html</b>)</p>
<pre class="brush: bash;">
chmod 755 /home/bree_olson/
chmod 755 /home/bree_olson
chown root:root /home/bree_olson
chown bree_olson:sftponly /home/bree_olson/public_html
</pre>
<h2>7.  Restart the SSHD daemon</h2>
<pre class="brush: bash;">
/etc/init.d/sshd restart
</pre>
<p>And that is it!  Just be sure to repeat steps 5 and 6 for all the <del datetime="2010-03-07T22:39:00+00:00">pornstars</del> users that you wish to lockdown.</p>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/linux/jailed-sftp-users-with-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>12 Android Apps I Can’t Live Without</title>
		<link>http://t3ch.com/android/12-android-apps-i-cant-live-without/</link>
		<comments>http://t3ch.com/android/12-android-apps-i-cant-live-without/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 23:58:38 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=375</guid>
		<description><![CDATA[1. PdaNet
Tether your phone&#8217;s data connection to your computer.  Now I always have an emergency internet connection.
2. StatusNotes
Create custom notifications in your status bar.  I love being able to set a quick reminder on the fly.  For short-term tasks and reminders that would otherwise get lost in RTM, I turn to Status [...]]]></description>
			<content:encoded><![CDATA[<h2>1. <a href="http://www.cyrket.com/p/android/com.pdanet/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.pdanet/?referer=');">PdaNet</a></h2>
<p>Tether your phone&#8217;s data connection to your computer.  Now I always have an emergency internet connection.</p>
<h2>2. <a href="http://www.cyrket.com/p/android/com.ipaulpro.statusnotes/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.ipaulpro.statusnotes/?referer=');">StatusNotes</a></h2>
<p>Create custom notifications in your status bar.  I love being able to set a quick reminder on the fly.  For short-term tasks and reminders that would otherwise get lost in RTM, I turn to Status Notes as an extension of my human memory.</p>
<h2>3. <a href="http://www.cyrket.com/p/android/com.pandora.android/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.pandora.android/?referer=');">Pandora Radio</a></h2>
<p>I am addicted to Pandora and couldn&#8217;t write code without it.</p>
<h2>4. <a href="http://www.cyrket.com/p/android/com.t3ch.imagetransfer/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.t3ch.imagetransfer/?referer=');">Image Transfer</a></h2>
<p>Wirelessly transfer your photos to your computer&#8217;s shared folder with 1 magical button.  This saves me so much hassle of dealing with USB cables.  Oh and I developed this app <img src='http://t3ch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>5. <a href="http://www.cyrket.com/p/android/com.google.android.apps.googlevoice/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.google.android.apps.googlevoice/?referer=');">Google Voice</a></h2>
<p>Use your Google Voice # for outbound calls and SMS.  I don&#8217;t even know my Verizon assigned phone number!</p>
<h2>6. <a href="http://www.cyrket.com/p/android/org.connectbot/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/org.connectbot/?referer=');">ConnectBot</a></h2>
<p>SSH.  Perfect for emergencies, just be careful when your root <img src='http://t3ch.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>7. <a href="http://www.cyrket.com/p/android/com.splashidandroid/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.splashidandroid/?referer=');">SplashID</a></h2>
<p>Store all your passwords and important info in SplashID.  It syncs wirelessly to your computer.  This app has saved me countless times.</p>
<h2>8. <a href="http://www.cyrket.com/p/android/com.rcreations.WebCamViewerPaid/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.rcreations.WebCamViewerPaid/?referer=');">IP Cam Viewer</a></h2>
<p>Keep an eye on your IP cams.  Works great with my Panasonic cams and even supports pan/tilt/zoom controls.</p>
<h2>9. <a href="http://www.cyrket.com/p/android/com.rememberthemilk.MobileRTM/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.rememberthemilk.MobileRTM/?referer=');">Remember The Milk</a></h2>
<p>I would not be able to function without lists.  With a RTM pro account, you can sync your tasks to rememberthemilk.com.</p>
<h2>10. <a href="http://www.cyrket.com/p/android/com.google.android.apps.listen/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.google.android.apps.listen/?referer=');">Listen</a></h2>
<p>Podcasts!  Turns your commute into productivity.  I spend much less time reading my news feeds and now listen to the podcast versions.</p>
<h2>11. <a href="http://www.cyrket.com/p/android/com.twidroid/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.twidroid/?referer=');">Twidroid</a></h2>
<p>A very slick Twitter client that is not bloated and gets the job done well.</p>
<h2>12. <a href="http://www.cyrket.com/p/android/com.evernote/" onclick="pageTracker._trackPageview('/outgoing/www.cyrket.com/p/android/com.evernote/?referer=');">Evernote</a></h2>
<p>I use Evernote for my personal knowledge base.  Having this data with me on my phone definitely comes in handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/android/12-android-apps-i-cant-live-without/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Personal Knowledge Base (Evernote &amp; Github)</title>
		<link>http://t3ch.com/howto/my-personal-knowledge-base-evernote-github/</link>
		<comments>http://t3ch.com/howto/my-personal-knowledge-base-evernote-github/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 23:12:11 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[kb]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=351</guid>
		<description><![CDATA[Keeping track of code snippets, network diagrams, IP allocations, complex syntax and everything else that a typical coder/sysadmin deals with requires a solid knowledge base.  
I am using Github for code snippets and Evernote for everything else.
Gists at Github are excellent for storing code snippets.  They can even be made public so others [...]]]></description>
			<content:encoded><![CDATA[<p>Keeping track of code snippets, network diagrams, IP allocations, complex syntax and everything else that a typical coder/sysadmin deals with requires a solid knowledge base.  </p>
<p>I am using <a href="http://www.github.com/joet3ch" onclick="pageTracker._trackPageview('/outgoing/www.github.com/joet3ch?referer=');">Github</a> for code snippets and <a href="http://www.evernote.com" onclick="pageTracker._trackPageview('/outgoing/www.evernote.com?referer=');">Evernote</a> for everything else.</p>
<p>Gists at Github are excellent for storing code snippets.  They can even be made public so others could use them also.  I was using <a href="http://www.snipplr.com" onclick="pageTracker._trackPageview('/outgoing/www.snipplr.com?referer=');">Snipplr</a> up until now, and it worked out great especially with the TextMate integration.  Since I moved my code repositories to Github, I wanted to everything in 1 central place.</p>
<p><a href="http://t3ch.com/wp-content/uploads/2010/03/gists_example.png"><img src="http://t3ch.com/wp-content/uploads/2010/03/gists_example.png" alt="" title="gists_example" width="714" height="498" class="aligncenter size-full wp-image-355" /></a></p>
<p>Evernote allows you to make separate notebooks and tags which makes organizing your knowledge base pretty simple.  The best part though, is the syncing.  I am using the Mac and Android apps which sync to evernote.com, so I always have access to my stuff.  Adding any type of files within a note is super handy.  For instance, I put my network diagram OmniGraffle file in a note and now when I edit the file in OmniGraffle, it automatically saves in the Evernote!  Evernote seems to offer a ton of features such as OCR and sharing, but I haven&#8217;t explored them much yet.  </p>
<p><a href="http://t3ch.com/wp-content/uploads/2010/03/evernote_example.png"><img src="http://t3ch.com/wp-content/uploads/2010/03/evernote_example.png" alt="" title="evernote_example" width="537" height="621" class="aligncenter size-full wp-image-359" /></a></p>
<p>I am very excited about how both of these services will be increasing my efficiency as I move more of my data into Evernote and Github.  Should save tons of time by having access to this info anywhere I go and eliminating having to search a variety of sources.</p>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/howto/my-personal-knowledge-base-evernote-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Transfer Android App</title>
		<link>http://t3ch.com/development/image-transfer-android-app/</link>
		<comments>http://t3ch.com/development/image-transfer-android-app/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 03:58:10 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=298</guid>
		<description><![CDATA[Introducing &#8220;Image Transfer&#8221; for Android.  Officially available now in the Android Market!
I was looking for a way to wirelessly transfer the images from my Droid to my computer.  There are several file manager apps that will do this, but I wanted a super simple magic button.  So I developed Image Transfer for [...]]]></description>
			<content:encoded><![CDATA[<p>Introducing &#8220;Image Transfer&#8221; for Android.  Officially available now in the <a href="market://search?q=pname:com.t3ch.imagetransfer">Android Market!</a></p>
<p>I was looking for a way to wirelessly transfer the images from my Droid to my computer.  There are several file manager apps that will do this, but I wanted a super simple magic button.  So I developed Image Transfer for Android using <a href="http://jcifs.samba.org/" onclick="pageTracker._trackPageview('/outgoing/jcifs.samba.org/?referer=');">JCIFS</a> (Java CIFS Client Library).</p>
<p>The app is quite simple.  The only requirements are that you have a shared folder on your computer and your Android device is on the same wireless network.  After setting up your shared folder, just add your destination computer IP address and the folder to transfer images to along with your username and password in the settings menu.  Then just press &#8216;Start Transfer&#8217; whenever you want to transfer your pictures.  Here are some screenshots&#8230;<br />
</p>
<p><a href="http://t3ch.com/wp-content/uploads/2010/03/main.png"><img src="http://t3ch.com/wp-content/uploads/2010/03/main-168x300.png" alt="" title="main" width="168" height="300" class="alignleft size-medium wp-image-299" /></a><br />
<a href="http://t3ch.com/wp-content/uploads/2010/03/transfer-progress.png"><img src="http://t3ch.com/wp-content/uploads/2010/03/transfer-progress-168x300.png" alt="" title="transfer progress" width="168" height="300" class="alignleft size-medium wp-image-301" /></a><br />
<a href="http://t3ch.com/wp-content/uploads/2010/03/transfer-complete.png"><img src="http://t3ch.com/wp-content/uploads/2010/03/transfer-complete-168x300.png" alt="" title="transfer complete" width="168" height="300" class="alignleft size-medium wp-image-302" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/development/image-transfer-android-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unix Epoch Converter for Android – Direct Download</title>
		<link>http://t3ch.com/linux/unix-epoch-converter-for-android-direct-download/</link>
		<comments>http://t3ch.com/linux/unix-epoch-converter-for-android-direct-download/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 03:38:43 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=292</guid>
		<description><![CDATA[Along with the device&#8217;s default time zone, output is now also displayed in GMT for conversions by utilizing the java.util.TimeZone class.
If your not using the Android Market by Google, download the package at Github
]]></description>
			<content:encoded><![CDATA[<p>Along with the device&#8217;s default time zone, output is now also displayed in GMT for conversions by utilizing the java.util.TimeZone class.</p>
<p>If your not using the Android Market by Google, download the package at <a href="http://www.github.com/joet3ch/Android-Unix-Epoch-Converter" onclick="pageTracker._trackPageview('/outgoing/www.github.com/joet3ch/Android-Unix-Epoch-Converter?referer=');">Github</a></p>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/linux/unix-epoch-converter-for-android-direct-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Developer Lab at Google NYC</title>
		<link>http://t3ch.com/google/android-developer-lab-at-google-nyc/</link>
		<comments>http://t3ch.com/google/android-developer-lab-at-google-nyc/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 02:33:15 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=281</guid>
		<description><![CDATA[Attended the Android Developer Lab at Google in NYC yesterday and had a blast playing with the Nexus One and several other devices.  The presentation and Q/A was filled with topics such as developing for multiple hardware configurations, inter-application communications, marketplace strategies and the do&#8217;s and dont&#8217;s of Android development.  We all know [...]]]></description>
			<content:encoded><![CDATA[<p>Attended the <a href="https://sites.google.com/site/androiddevlabs/" onclick="pageTracker._trackPageview('/outgoing/sites.google.com/site/androiddevlabs/?referer=');">Android Developer Lab at Google in NYC</a> yesterday and had a blast playing with the Nexus One and several other devices.  The presentation and Q/A was filled with topics such as developing for multiple hardware configurations, inter-application communications, marketplace strategies and the do&#8217;s and dont&#8217;s of Android development.  We all know that Google is super developer friendly&#8230; and they showed their love yesterday by giving every developer a free Motorola Droid device!</p>
<p>Checkout the world&#8217;s largest Nexus One:</p>

<a href='http://t3ch.com/google/android-developer-lab-at-google-nyc/attachment/2010-02-12-18-16-05/' title='2010-02-12 18.16.05'><img width="150" height="150" src="http://t3ch.com/wp-content/uploads/2010/02/2010-02-12-18.16.05-150x150.jpg" class="attachment-thumbnail" alt="" title="2010-02-12 18.16.05" /></a>
<a href='http://t3ch.com/google/android-developer-lab-at-google-nyc/attachment/2010-02-12-18-16-17/' title='2010-02-12 18.16.17'><img width="150" height="150" src="http://t3ch.com/wp-content/uploads/2010/02/2010-02-12-18.16.17-e1266114670882-150x150.jpg" class="attachment-thumbnail" alt="" title="2010-02-12 18.16.17" /></a>

]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/google/android-developer-lab-at-google-nyc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Epoch Converter for Android</title>
		<link>http://t3ch.com/android/unix-epoch-converter-for-android/</link>
		<comments>http://t3ch.com/android/unix-epoch-converter-for-android/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 06:08:07 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=220</guid>
		<description><![CDATA[Just published my first Android application in the Android Marketplace    
Developing for Android isn&#8217;t too complicated at all.  You need to have a firm grasp on Java and then learn how to work with the Android SDK and build layouts (which are XML btw).  I am now working on a [...]]]></description>
			<content:encoded><![CDATA[<p>Just published my first Android application in the Android Marketplace <img src='http://t3ch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   </p>
<p>Developing for Android isn&#8217;t too complicated at all.  You need to have a firm grasp on Java and then learn how to work with the Android SDK and build layouts (which are XML btw).  I am now working on a desktop widget that could live actively on any of the Android virtual desktops.</p>
<p>To install on your Android device, search for &#8216;Unix Epoch Converter&#8217; in the Android market or scan this QR code: </p>
<p><a href="http://t3ch.com/wp-content/uploads/2010/01/UnixEpochConverter-QR1.png"><img src="http://t3ch.com/wp-content/uploads/2010/01/UnixEpochConverter-QR1.png" alt="" title="UnixEpochConverter-QR" width="234" height="234" class="aligncenter size-full wp-image-234" /></a></p>
<p>Here are some screenshots:</p>
<div id="attachment_221" class="wp-caption aligncenter" style="width: 330px"><a href="http://t3ch.com/wp-content/uploads/2010/01/1.png"><img src="http://t3ch.com/wp-content/uploads/2010/01/1.png" alt="" title="Screenshot 1" width="320" height="480" class="size-full wp-image-221" /></a><p class="wp-caption-text">Home Screen</p></div>
<div id="attachment_222" class="wp-caption aligncenter" style="width: 330px"><a href="http://t3ch.com/wp-content/uploads/2010/01/2.png"><img src="http://t3ch.com/wp-content/uploads/2010/01/2.png" alt="" title="Screenshot 2" width="320" height="480" class="size-full wp-image-222" /></a><p class="wp-caption-text">Convert to unix timestamp</p></div>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/android/unix-epoch-converter-for-android/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Smooth transition during device configuration changes in Android</title>
		<link>http://t3ch.com/linux/android_transitions/</link>
		<comments>http://t3ch.com/linux/android_transitions/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 00:47:46 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=210</guid>
		<description><![CDATA[I had to build a simple Android video player while reading &#8220;Hello, Android&#8221; Second Edition by Ed Burnette.  I am about half way through this book, and it is excellent!  The author gets right to the point and the lessons are completely hands on.
After completing the short video player tutorial, you notice how [...]]]></description>
			<content:encoded><![CDATA[<p>I had to build a simple Android video player while reading <a href="http://pragprog.com/titles/eband2/hello-android" onclick="pageTracker._trackPageview('/outgoing/pragprog.com/titles/eband2/hello-android?referer=');">&#8220;Hello, Android&#8221; Second Edition by Ed Burnette</a>.  I am about half way through this book, and it is excellent!  The author gets right to the point and the lessons are completely hands on.</p>
<p>After completing the short video player tutorial, you notice how the video restarts after device configuration changes, such as a screen rotation.  The book suggests using the &#8216;onRetainNonConfigurationInstance()&#8217; and &#8216;getLastNonConfigurationInstance()&#8217; methods to save data which would otherwise be lost during the &#8216;onCreate()&#8217; and &#8216;onDestroy()&#8217; methods.  I decided to figure this out on my own and&#8230; it works <img src='http://t3ch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The code is basic and probably has some inefficient stuff, but I think it is a sufficient example of saving the video state.  Keep in mind that the &#8216;getLastNonConfigurationInstance()&#8217; method is great for any instance that needs to be able to transition smoothly during changes such as a screen rotation.</p>
<pre class="brush: java;">
package org.example.video;

import android.app.Activity;
import android.os.Bundle;
import android.widget.VideoView;
import android.util.Log;

public class Video extends Activity {

	public static final String TAG = &quot;Video&quot;;
	private VideoView videoObject;
	private String videoLocation;
	private int videoPosition;

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // create view
        setContentView(R.layout.main);

    	// initialize video object
        videoObject = (VideoView) findViewById(R.id.video);

        // attempt to get data from before device configuration change
        Bundle returnData = (Bundle) getLastNonConfigurationInstance();

        if (returnData == null) {

        	// first startup
        	Log.d(TAG, &quot;Player started for 1st time&quot;);

	        // set video path
	        videoLocation = &quot;/sdcard/DCIM/Camera/video-2010-01-10-15-21-17.3gp&quot;;
	        videoObject.setVideoPath(videoLocation);

	        // play video
	        videoObject.start();

        } else {
        	// restart after device config change
        	Log.d(TAG, &quot;Player re-started after device configuration change&quot;);

        	// fetch data from bundle
        	videoLocation = returnData.getString(&quot;LOCATION&quot;);
        	videoPosition = returnData.getInt(&quot;POSITION&quot;);
    		Log.d(TAG, &quot;Video location: &quot; + videoLocation);
    		Log.d(TAG, &quot;Video position: &quot; + videoPosition);

    		// apply properties to new object
	        videoObject.setVideoPath(videoLocation);
	        videoObject.seekTo(videoPosition);

	        // play video
        	videoObject.start();
        }
    }

	@Override
	public Object onRetainNonConfigurationInstance() {
		// Device configuration changed
		// Save current video playback state
		Log.d(TAG, &quot;Saving video playback state&quot;);
		videoPosition = videoObject.getCurrentPosition();
		Log.d(TAG, &quot;Video location: &quot; + videoLocation);
		Log.d(TAG, &quot;Video position: &quot; + videoPosition);

		// Build bundle to save data for return
		Bundle data = new Bundle();
		data.putString(&quot;LOCATION&quot;, videoLocation);
		data.putInt(&quot;POSITION&quot;, videoPosition);
		return data;
	}

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/linux/android_transitions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A little BASH of network monitoring</title>
		<link>http://t3ch.com/linux/a-little-bash-of-network-monitoring-4/</link>
		<comments>http://t3ch.com/linux/a-little-bash-of-network-monitoring-4/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 05:15:55 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=177</guid>
		<description><![CDATA[Nothing revolutionary here, but this is a super quick and simple way to monitor the availability of your network nodes via ICMP.
Prerequisites:
- Ability to send mail from the server running the script
- ICMP connectivity to each target node
- DNS provider that does NOT rewrite domain errors (NXDOMAIN redirect)
1.  Create a file with a list [...]]]></description>
			<content:encoded><![CDATA[<p>Nothing revolutionary here, but this is a super quick and simple way to monitor the availability of your network nodes via ICMP.</p>
<p>Prerequisites:<br />
- Ability to send mail from the server running the script<br />
- ICMP connectivity to each target node<br />
- DNS provider that does NOT rewrite domain errors (NXDOMAIN redirect)</p>
<p>1.  Create a file with a list of nodes (I used &#8216;nodes.list&#8217;) and make it relative to your script.  Use IP addresses or FQDNs if you always trust DNS&#8230;.</p>
<p>nodes.list:</p>
<pre class="brush: bash;">
monitor02.t3ch.com
monitor03.t3ch.com
10.10.0.72
www.t3ch.com
mail.t3ch.com
</pre>
<p>2.  Create the following BASH script, tweak $SOURCE and $TO.</p>
<pre class="brush: bash;">
#!/bin/bash

SOURCE=&quot;monitor01.t3ch.com&quot;
SUBJECT=&quot;Network Alert: Node unreachable&quot;
TO=&quot;youremail@t3ch.com&quot;
MESSAGE=&quot;/tmp/network_monitor-message.txt&quot;

for ipaddr in `cat nodes.list`;
    do
        if ! ping -c 1 $ipaddr
            then
                echo &quot;Node: $ipaddr&quot; &gt; $MESSAGE
                echo &quot;When: `date`&quot; &gt;&gt; $MESSAGE
                echo &quot;Source: $SOURCE&quot; &gt;&gt; $MESSAGE
                /usr/bin/mail -s &quot;$SUBJECT&quot; &quot;$TO&quot; &lt; $MESSAGE
                rm $MESSAGE
        fi
done
</pre>
<p>3.  Create a cron job.  Here is an example that performs the checks every 5 minutes:</p>
<pre class="brush: bash;">
*/5 * * * * /opt/apps/network_monitor/network_monitor.sh &gt;&gt; /dev/null 2&gt;&amp;1
</pre>
<p>4.  Test out the script by adding a few bogus IP addresses to the nodes.list source file.  Then remove them.</p>
<p>5.  Sit back and relax, then begin troubleshooting when you get your first alert <img src='http://t3ch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/linux/a-little-bash-of-network-monitoring-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bypassing SSL Web Services During Development</title>
		<link>http://t3ch.com/linux/bypassing-ssl-web-services-during-development/</link>
		<comments>http://t3ch.com/linux/bypassing-ssl-web-services-during-development/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 01:58:04 +0000</pubDate>
		<dc:creator>joet3ch</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://t3ch.com/?p=122</guid>
		<description><![CDATA[When integrating with a web service that requires ssl, I find it helpful to write code to use a non-ssl web service.  This will ensure that you can debug your code without worrying about ssl certificate issues and such.  I use Socat to establish the ssl connection and then point my code at [...]]]></description>
			<content:encoded><![CDATA[<p>When integrating with a web service that requires ssl, I find it helpful to write code to use a non-ssl web service.  This will ensure that you can debug your code without worrying about ssl certificate issues and such.  I use Socat to establish the ssl connection and then point my code at the local port serving normal http. </p>
<p>Install Socat (a network relay utility) available at <a href="http://freshmeat.net/projects/socat/" onclick="pageTracker._trackPageview('/outgoing/freshmeat.net/projects/socat/?referer=');">http://freshmeat.net/projects/socat/</a></p>
<p>Establish the SSL connection:</p>
<pre class="brush: bash;">
socat tcp4-listen:9090,fork openssl:10.2.0.43:443,verify=0,cafile=/opt/apps/config/cacert.pem,key=/opt/apps/config/local.key,cert=/opt/apps/config/local.crt
</pre>
<p>Use localhost:9090 as the web service URL during development / testing.</p>
<p>Be sure to get your code working with the real ssl enabled web service prior to deploying the app in production.</p>
]]></content:encoded>
			<wfw:commentRss>http://t3ch.com/linux/bypassing-ssl-web-services-during-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
