<?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>Tom's World &#187; Technology</title>
	<atom:link href="http://tompohl.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://tompohl.com</link>
	<description>dataModuliplator-&#62;modulipolate();</description>
	<lastBuildDate>Sun, 01 Aug 2010 03:36:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HOWTO: Track your mac</title>
		<link>http://tompohl.com/2010/01/23/howto-track-your-mac/</link>
		<comments>http://tompohl.com/2010/01/23/howto-track-your-mac/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 04:51:18 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://tompohl.com/?p=67</guid>
		<description><![CDATA[A couple years ago, after I purchased a mac laptop with a built-in camera, I set it up to take a picture every time it booted/woke up and upload it to one of my web servers if internet access was available.  I called it my poor man's laptop lojack.[...]]]></description>
			<content:encoded><![CDATA[<p>A couple years ago, after I purchased a mac laptop with a built-in camera, I set it up to take a picture every time it booted/woke up and upload it to one of my web servers if internet access was available.  I called it my poor man&#8217;s laptop lojack. Of course with all good things, Apple came out with an operating system update that disabled access to the camera from any user (even root) except for the locally logged in user. I suppose that is a good thing except when you actually *want* to be able to do what I was doing. Once it broke, I hadn&#8217;t bothered to figure out a way around it until the other night when I was pissed off enough to find a way!</p>
<p>Luckily, a couple weeks ago, I learned about launchctl. It is now the primary way in OSX to launch system daemons instead of init scripts or xinetd. It turns out, using launchctl, as root, you can execute a program in another context using its bsexec subcommand! If you use the loginwindow process id&#8217;s context you&#8217;d like to run your program in, it will now run just as if you were physically sitting at the keyboard.  The command:</p>
<blockquote><p>isightcapture image.jpg</p></blockquote>
<p>which would before fail if you ssh&#8217;d into a remote machine now becomes:</p>
<blockquote><p>export PID=`ps auxww |grep loginwindow |grep -v grep |awk &#8216;{print $2}&#8217;`<br />
launchctl bsexec $PID isightcapture image.jpg</p></blockquote>
<p>Bamo! Now you&#8217;re breakin&#8217; the law in style!</p>
<p>So, since I&#8217;ve got my crappy little image uploader working once again, I thought I&#8217;d share it with the rest of the world. I&#8217;m using sleepwatcher, isightcapture, and some other craziness that I hacked together to overlay some good information on a picture from your webcam and upload it to a website of your choice!</p>
<p>If you know what you&#8217;re doing, you should be able to follow my instructions just fine, if you don&#8217;t know what you&#8217;re doing, you might possibly blow up your mac and kill a kitten.  You have been warned!</p>
<p>First, download the following file (I&#8217;m going to assume it will download into your Downloads folder):</p>
<p><a href="http://tompohl.com/files/locateme.tgz" target="_blank">http://tompohl.com/files/locateme.tgz</a></p>
<p>Create a directory on your web server to host the supporting scripts and uploaded images for example:</p>
<blockquote>
<div>mkdir /var/www/html/locateme</div>
</blockquote>
<div>
<div id="_mcePaste">Create a password file and user (myuser in this example) that will be used</div>
<blockquote>
<div>mkdir /var/www/etc<br />
htpasswd -c /var/www/etc/locateme.passwd myuser</div>
</blockquote>
<div>
<div>If you&#8217;d like to add more users, simply run htpasswd without the -c option:</div>
<blockquote>
<div>htpasswd /var/www/etc/locateme.passwd anotheruser</div>
</blockquote>
<div>In your apache configuration, add a directory declaration that enables password authentication with the password file you created. This would go inside your virtual host declaration.</div>
<blockquote>
<div>
<div>&lt;Directory &#8220;/var/www/html/locateme&#8221;&gt;</div>
<div>AuthType Basic</div>
<div>AuthName Private</div>
<div>AuthUserFile /var/www/etc/locateme.passwd</div>
<div>AllowOverride None</div>
<div>Order allow,deny</div>
<div>Allow from all</div>
<div>require valid-user</div>
<div>&lt;/Directory&gt;</div>
</div>
</blockquote>
<div>
<div>run:</div>
<blockquote>
<div>apachectl configtest</div>
</blockquote>
<div>If you get &#8220;Syntax OK&#8221; feel free to gracefully restart apache:</div>
<blockquote>
<div>apachectl graceful</div>
</blockquote>
<div>
<div>Back on your local computer in Terminal:</div>
<div>
<blockquote>
<div>cd ~/Downloads</div>
<div>tar -xzvf locateme.tgz</div>
<div>cd locateme</div>
<div>mv .locateme /</div>
</blockquote>
<div>
<div>Then, copy the contents of locateme/web directory into your /var/www/html/locateme directory on your web server</div>
<div>make the uploads directory writable by your web server (the following would work):</div>
<blockquote>
<div>chmod 777 /var/www/html/locateme/uploads</div>
</blockquote>
<div>Open the sleepwatcher_2.0.5.dmg and install both &#8220;SleepWatcher.pkg&#8221; and &#8220;SleepWatcher StartupItem.pkg&#8221; You then need to modify the /etc/rc.wakeup script</div>
<blockquote>
<div>sudo vi /etc/rc.wakeup</div>
</blockquote>
<div>
<div>Edit line 36 to read from:</div>
<blockquote>
<div>
<div>su &#8211; $user -c &#8220;$home/.wakeup&#8221;</div>
</div>
</blockquote>
<div>To:</div>
<blockquote>
<div>
<div>$home/.wakeup</div>
</div>
</blockquote>
<div>
<div>Then symlink my custom .wakeup script to your home directory</div>
<blockquote>
<div>ln -s /.locateme/.wakeup ~/.wakeup</div>
</blockquote>
<div>Now, you need to customize the locateme configuration script to match your username, password, and url for your website</div>
<blockquote>
<div>vi /.locateme/locateme.conf</div>
</blockquote>
<div>
<div>Put your mac to sleep, then wake it up and you should see your camera light up and when you visit your website (http://yourwaycoolwebsite.com/locateme) and enter in your username and password, you should see your picture with some good information overlaid in a box in the corner!</div>
<div>Things to note:</div>
<div>
<ul>
<li>If your computer doesn&#8217;t connect to the network, it will still save your pictures in /.locateme/images/taken and all images successfully sent to the webserver will be moved into /.locateme/images/sent</li>
<li>On the webserver, all images will be saved in the directory locateme/username/ with locateme/username/latest.jpg always pointing to the last picture taken.</li>
</ul>
</div>
<div>To give credit where credit is due, here are the sites I originally found the programs that I used:</div>
<div>
<blockquote>
<div>isightcapture:</div>
<div>http://www.intergalactic.de/pages/iSight.html</div>
</blockquote>
<blockquote>
<div>sleepwatcher:</div>
<div>http://www.bernhard-baehr.de/</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tompohl.com/2010/01/23/howto-track-your-mac/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>There are 10 types of people in this world &#8230;</title>
		<link>http://tompohl.com/2009/04/26/there-are-10-types-of-people-in-this-world/</link>
		<comments>http://tompohl.com/2009/04/26/there-are-10-types-of-people-in-this-world/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 04:49:37 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://tompohl.com/?p=40</guid>
		<description><![CDATA[It&#8217;s an old joke, but funny if you&#8217;re a dork like me:
There are 10 types of people in this world.  Those who understand binary and those who don&#8217;t.
Let&#8217;s talk about numbering systems.  Specifically Decimal (base10), Hexadecimal (base16) and Binary (base2).
First off, what is this base stuff that you&#8217;re talking about.  The base number in a numbering system [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s an old joke, but funny if you&#8217;re a dork like me:</p>
<blockquote><p>There are 10 types of people in this world.  Those who understand binary and those who don&#8217;t.</p></blockquote>
<p>Let&#8217;s talk about numbering systems.  Specifically Decimal (base10), Hexadecimal (base16) and Binary (base2).</p>
<p>First off, what is this base stuff that you&#8217;re talking about.  The base number in a numbering system is the number of values represented by a single digit.</p>
<p><span style="text-decoration: underline;">Decimal &#8211; Base 10</span></p>
<p><span>This is the numbering system that everyone should know.  Each digit can have up to 10 values 0,1,2,3,4,5,6,7,8,9.  You might be saying &#8220;Wait a minute! Why is it called base 10 if its highest number for a digit is 9?&#8221; I&#8217;d say, fantastic question! Here&#8217;s the secret: </span><strong>nothing is really something</strong><span>. For each additional digit added in a number, you increase the total number of values that you can represent by a factor of 10. That is:</span></p>
<p><span>1 digit  (0 to 9) = 10 values =  10 = 10^1</span></p>
<p><span>2 digits (00 to 99) = 100 values = 10 x 10 = 10^2</span></p>
<p><span>3 digits (000 to 999) = 1000 values = 10 x 10 x 10 = 10^3</span></p>
<p><span>Now, don&#8217;t get freaked out when I say 3 digits can be 000 to 999 because 000 is the same as 0 is the same as 0^3. Just don&#8217;t confuse it with 0^0 which would be 1 (I already told you, </span><strong>nothing is really something</strong><span>).</span></p>
<p><span>So, if you take the base of your numbering system (10 in this case) and take it to the power of the number of digits you&#8217;re using, you&#8217;ll get the total number of values you can represent with that number.  Note: the highest number you can represent is 1 less than the total number of values you could represent because </span><strong>nothing is really something</strong><span>!</span></p>
<p><span>Example math:</span></p>
<pre> 1  (overflow aka carry the 1)
  9
+ 1
---
 10</pre>
<p><span style="text-decoration: underline;">Hexadecimal &#8211; Base 16</span></p>
<p><span>I&#8217;ve included hexadecimal in this discussion simply because it&#8217;s cool and you&#8217;ll find it in a lot of places on the web.  A single digit can represent up to 16 different values 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. That&#8217;s right, you just got your alphabet in my numbers and I just got my numbers in your alphabet! In this notation, A = 10, B = 11, and so forth up to F = 15. A lot of times, when you see a number that is represented in hex (the short name for hexadecimal) they might tip you off by placing a 0x before the value.  This is important BECAUSE once we get into multiple digits, a hex number without any letters looks just like a decimal number, but its value totally different!</span></p>
<p><span>1 digit (0 to F) = 16 values = 16 = 16^1</span></p>
<p><span>2 digits (00 to FF) = 256 values = 16 x 16 = 16^2</span></p>
<p><span>3 digits (000 to FFF) = 4096 values = 16 x 16 x 16 = 16^3</span></p>
<p>Example math (15 + 1 = 16 right? Here&#8217;s how you do it in hex):</p>
<pre> 1  (overflow aka carry the 1)
  F
+ 1
---
 10</pre>
<p><span style="text-decoration: underline;">Binary &#8211; Base 2</span></p>
<p>OK now the whole reason for this entry. We&#8217;re talking binary 1&#8217;s and 0&#8217;s the language of LOVEly computers. In binary, there are only 2 values, 0 and 1, off and on. I&#8217;m only going to deal with unsigned binary numbers (no negative numbers) because in my future entries, I&#8217;ll be explaining things like masks and bytes in regards to TCP/IP networking. Besides, I&#8217;m a generally positive guy and try to not dwell on the negative. On to the numbers!</p>
<p>1 digit (0 and 1) = 2 values = 2 = 2^1</p>
<p>2 digits (00 through 11) = 4 values = 2 x 2 = 2^2</p>
<p>3 digits (000 through 111) = 8 values = 2 x 2 x 2 = 2^3</p>
<p>8 digits (00000000 through 11111111) = 256 values = 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 2^8</p>
<p>Example math (1 + 1 = 2 of course! Now, let&#8217;s see what that looks like in binary):</p>
<pre> 1  (overflow aka carry the 1)
  1
+ 1
---
 10</pre>
<p>Ahh yes! There it is! The punch line to our joke! Feel free to laugh OR cry OR just pitty me for regurgitating this stuff from memory.</p>
<p>Bring on your questions! Do you need more examples? You might be asking yourself, &#8220;But in the world does this have to do with the OpenVPN configuration that Tom&#8217;s working towards?&#8221; For that, you&#8217;ll have to keep coming back to find out!</p>
]]></content:encoded>
			<wfw:commentRss>http://tompohl.com/2009/04/26/there-are-10-types-of-people-in-this-world/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rising to the Challenge</title>
		<link>http://tompohl.com/2009/04/22/rising-to-the-challenge/</link>
		<comments>http://tompohl.com/2009/04/22/rising-to-the-challenge/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 05:33:27 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://tompohl.com/?p=35</guid>
		<description><![CDATA[Greetings!  It&#8217;s been about a year since my last blog post so it is time for my obligatory annual entry.
Actually, a couple people have asked me to write up some instructions on getting remote access to a home / office network so they can use remote resources like Apple&#8217;s Time Capsule or iTunes music shares.
I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Greetings!  It&#8217;s been about a year since my last blog post so it is time for my obligatory annual entry.</p>
<p>Actually, a couple people have asked me to write up some instructions on getting remote access to a home / office network so they can use remote resources like Apple&#8217;s Time Capsule or iTunes music shares.</p>
<p>I&#8217;ve decided to rise to the challenge, BUT I feel that I need to lay a solid base of knowledge before I tackle explaining my solution.  My goal is to help you make smart decisions about designing your network.</p>
<p>Over the next several posts, I plan to cover the following topics:</p>
<ol>
<li>Numbering systems (Decimal, Binary, Hexadecimal)</li>
<li>Bits, Nibbles, Bytes, Words</li>
<li>TCP/IP Networking</li>
<li>Using OpenVPN to access your network remotely</li>
</ol>
<p>To some / most of you, a lot of this will be boring or old news to you, but please keep with it! If anything, correct where I&#8217;m wrong, call me out when you think I&#8217;m full of it, and most certainly, ask for clarification when you just don&#8217;t understand what I&#8217;m talking about.</p>
<p>Let&#8217;s DO this!</p>
]]></content:encoded>
			<wfw:commentRss>http://tompohl.com/2009/04/22/rising-to-the-challenge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
