<?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>Putztastic Tech</title>
	<atom:link href="http://www.nikvdp.com/technotes/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.nikvdp.com/technotes</link>
	<description>A chronicle of my putztastic technical escapades</description>
	<lastBuildDate>Fri, 13 Aug 2010 14:13:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up a Poptop (PPTP) VPN on Ubuntu</title>
		<link>http://www.nikvdp.com/technotes/?p=51</link>
		<comments>http://www.nikvdp.com/technotes/?p=51#comments</comments>
		<pubDate>Fri, 13 Aug 2010 14:11:29 +0000</pubDate>
		<dc:creator>Nik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nikvdp.com/technotes/?p=51</guid>
		<description><![CDATA[This is a pretty useful trick if you need to get around a corporate firewall or the Great fireWall of China. It still allows PPTP through, setting it up is pretty easy and unlike OpenVPN it&#8217;s supported by every major OS without any additional software. You can even use it from your iPhone.
To get it ]]></description>
			<content:encoded><![CDATA[<p>This is a pretty useful trick if you need to get around a corporate firewall or the Great fireWall of China. It still allows PPTP through, setting it up is pretty easy and unlike OpenVPN it&#8217;s supported by every major OS without any additional software. You can even use it from your iPhone.</p>
<p>To get it going you need one server or VPS that you have access too. Install pptpd with<br />
<code>sudo apt-get install pptpd</code><br />
Now to edit some files&#8230; I&#8217;d suggest giving your machine a static IP address by editing<code> /etc/network/interfaces</code> (be careful, if you are not using the server version of Ubuntu Network Manager will most likely take over and set your machine back to DHCP. I&#8217;d recommend disabling Network Manager or trying to set a Static IP through it.</p>
<p>You will first need to figure out what subnet your router is using. The quickest way to do this is just to type <code>ifconfig</code> at the command prompt. Look for the output from</p>
<blockquote><p><code>eth0</code>, it should look something like this:<br />
<code>eth0      Link encap:Ethernet  HWaddr 00:22:22:22:22:22<br />
<strong><span style="color: #3366ff;">inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0</span></strong><br />
inet6 addr: fe80::240:45ff:fe26:775a/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
RX packets:225008 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:76464 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:32669088 (32.6 MB)  TX bytes:21169594 (21.1 MB)<br />
Interrupt:23 Base address:0xc800 </code></p></blockquote>
<p>The blue line is the one that you need to pay attention to. To drastically oversimplify, the numbers next to <code>inet addr</code>, are your IP address and the first three represent your subnet.  Ok, I&#8217;m too lazy to write the rest of this with that much detail. Long story short:</p>
<ul>
<li>set your current IP address with <code>/etc/network/interfaces</code> to a static IP. </li>
<li>edit <code>/etc/pptpd.conf</code> and add this:<br />
<code>localip 192.168.1.101<br />
remoteip 192.168.1.20-24<br />
</code><br />
changing the IPs to match your network&#8217;s config. </li>
<li>Add a line to /etc/ppp/chap-secrets with desired name and password</li>
<li>Uncomment and enable the the <code>#net.ipv4.ip_forward=0</code> line in 	<code>/etc/sysctl.conf</code> to <code>net.ipv4.ip_forward=1</code></li>
<li>Edit /etc/rc.local and add the following before the <code>exit 0</code>:<br />
<code>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br />
iptables -A FORWARD -i eth0 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
iptables -A FORWARD -i ppp0 -o eth0 -j ACCEPT</code></li>
<li>Execute <code>/etc/init.d/rc.local start</code> to start the IP masquerading</li>
<li>Execute <code>sysctl -p</code> to refresh the sysctl.conf settings you changed</li>
<p>That should do it.</p>
<p>References:<br />
<a href="http://www.ubuntugeek.com/howto-pptp-vpn-server-with-ubuntu-10-04-lucid-lynx.html">http://www.sharedknowhow.com/2008/09/linux-vpn-server-installation-for-use-with-iphone/</a><br />
<a href="http://www.ubuntugeek.com/howto-pptp-vpn-server-with-ubuntu-10-04-lucid-lynx.html">http://www.ubuntugeek.com/howto-pptp-vpn-server-with-ubuntu-10-04-lucid-lynx.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nikvdp.com/technotes/?feed=rss2&amp;p=51</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFmpeg iphone recipes</title>
		<link>http://www.nikvdp.com/technotes/?p=33</link>
		<comments>http://www.nikvdp.com/technotes/?p=33#comments</comments>
		<pubDate>Sun, 18 Apr 2010 00:34:20 +0000</pubDate>
		<dc:creator>Nik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nikvdp.com/technotes/?p=33</guid>
		<description><![CDATA[My Version
This is the ffmpeg command I use with the copy of ffmpeg I built locally on my mac via MacPorts. Check that your ffmpeg is OK by running
ffmpeg
from the command prompt, it will spit out some information about the various options it was compiled with, should look more or less like this:

FFmpeg version 0.5, ]]></description>
			<content:encoded><![CDATA[<p><strong>My Version</strong><br />
This is the ffmpeg command I use with the copy of ffmpeg I built locally on my mac via MacPorts. Check that your ffmpeg is OK by running<br />
<code>ffmpeg</code><br />
from the command prompt, it will spit out some information about the various options it was compiled with, should look more or less like this:<br />
<code><br />
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.<br />
configuration: --prefix=/opt/local --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64<br />
</code></p>
<p>Then use a command like the one below:<br />
<code><br />
ffmpeg -i INPUT.MOV -acodec libfaac -ab 128k -s 640x480 -vcodec libx264 -vpre hq -vpre ipod640 -b 1500k -aspect 4:3 -threads 0 -f ipod output.m4v<br />
</code></p>
<p>Info taken from <a href="http://rob.opendot.cl/index.php/useful-stuff/ipod-video-guide/">this site</a>.<br />
<strong>Stolen from Azureus</strong></p>
<p>Azureus now has iPhone encoding built in. I was a little curious how it managed the encoding, I had hoped they wrote a Java based video encoder capable of converting anything into iPhone suitable mp4s thereby creating a cross-platform solution that didn&#8217;t require compilation, but alas they, like everybody else used the power of open source via ffmpeg.</p>
<p>A little playing with the ps command and I was able to rescue the ffmpeg incantation they use to convert to iPhone. Since they helpfully include a pre-compliled ffmpeg binary with all the necessary libs this is actually almost as good since as many know trying to compile ffmpeg for each platform can be quite a difficult and trying experience.</p>
<p>Anyhow, here’s the code:</p>
<p><code>/Users/YourUser/Library/Application Support/Vuze/plugins/vuzexcode/ffmpeg -y -threads 2 -i file.avi -f mp4 -s 480x272 -r 23.976 -vcodec libx264 -bf 0 -coder 0 -refs 4 -g 50 -maxrate 8000kbps -bufsize 8000kbit -crf 20 -me_method umh -ar 32000 -ac 1 -ab 128 -acodec libfaac outfile.mp4</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nikvdp.com/technotes/?feed=rss2&amp;p=33</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard upgrade difficulties (adventures with Prism and Fluid SSBs)</title>
		<link>http://www.nikvdp.com/technotes/?p=3</link>
		<comments>http://www.nikvdp.com/technotes/?p=3#comments</comments>
		<pubDate>Wed, 02 Sep 2009 23:07:24 +0000</pubDate>
		<dc:creator>Nik</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://www.nikvdp.com/technotes/?p=3</guid>
		<description><![CDATA[For whatever reason upgrading to Snow Leopard broke the Fluid webApp I use to monitor my gMail account. (What&#8217;s Fluid you ask? Fluid is an application that allows you to make a website into a separate application. Basically, it&#8217;s a new browser window, but it gives you a separate icon on your Dock/Start Menu/What have ]]></description>
			<content:encoded><![CDATA[<p>For whatever reason upgrading to Snow Leopard broke the <a href="http://fluidapp.com/" target="_blank">Fluid</a> webApp I use to monitor my gMail account. (What&#8217;s Fluid you ask? Fluid is an application that allows you to make a website into a separate application. Basically, it&#8217;s a new browser window, but it gives you a separate icon on your Dock/Start Menu/What have you). I use Fluid with Google Gear&#8217;s offline plugin to get the convenience of a standalone email app, but still use the Gmail interface I&#8217;m used too and still be guaranteed to have access to all my email anywhere I can find a web browser.</p>
<p>One of the nicest things about using Fluid was that it let me use Google&#8217;s Offline Gmail extension (and the Google Gears plugin it requires) separate from my browser. That way I don&#8217;t have to clutter up my browser&#8217;s profile directory  with all my offline emails (this is important to me since I sync my entire browser profile over <a href="http://www.getdropbox.com">Dropbox</a> so that I get the same browsing experience everywhere). Unfortunately, it appears Google&#8217;s Gears isn&#8217;t quite compatible with Snow Leopard yet, so my offline Gmail functionality is no longer working. Confusingly, Fluid wouldn&#8217;t even load the Gmail website, it just hung at a white screen repeatedly.</p>
<p>Until Google updates the Gears plugin to support Snow Leopard, I&#8217;m temporarily switching back to Mozilla&#8217;s Prism product. Prism is very similar to Fluid (in fact, Prism is what inspired Fluid&#8217;s developers to create Fluid), but instead of being based on Apple&#8217;s WebKit (and thus highly integrated with OS X) it&#8217;s based on the Firefox code. This has the nice advantage that it&#8217;s cross platform and that it&#8217;s capable of using Firefox add-ons. It turns out only the Gears Safari plugin is broken on Snow Leopard, the Gears firefox add-on still works fine, so Prism has been able to solve all my email woes.</p>
<p>Well, almost all. One nice feature of Fluid is that it automatically shows dock badges on the Gmail dock icon whenever a new email message comes in. With Prism I&#8217;m stuck relying on my Gmail Checker Firefox add-on to alert me to new messages. Getting offline Gmail to work in Prism is a bit of a challenge though. I ended up following the directions here:</p>
<p><a href="http://otaqui.com/blog/382/enable-google-gears-and-offline-gmail-for-mozilla-prism/">http://westacular.livejournal.com/43666.html</a></p>
<p>with some references to the directions here:</p>
<p><a href="http://otaqui.com/blog/382/enable-google-gears-and-offline-gmail-for-mozilla-prism/">http://otaqui.com/blog/382/enable-google-gears-and-offline-gmail-for-mozilla-prism/</a><br />
Here&#8217;s my modified copy of the <a href="wp-content/uploads/gears-for-prism.xpi">google-gears xpi</a>, it should work on any version of Prism since I basically just short-circuited the version check. YMMV, I&#8217;m not responsible for any computing disasters that may result from using this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nikvdp.com/technotes/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
