<?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>waiting for the future</title>
	<atom:link href="http://www.waitingforthefuture.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.waitingforthefuture.org</link>
	<description></description>
	<lastBuildDate>Tue, 14 Feb 2012 21:50:18 +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>jScrollpane and iframe/fancybox woes</title>
		<link>http://www.waitingforthefuture.org/2010/07/12/jscrollpane-and-iframefancybox-woes/</link>
		<comments>http://www.waitingforthefuture.org/2010/07/12/jscrollpane-and-iframefancybox-woes/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 01:14:56 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[fancybox]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jscrollpane]]></category>
		<category><![CDATA[lightbox]]></category>

		<guid isPermaLink="false">http://www.waitingforthefuture.org/?p=90</guid>
		<description><![CDATA[Recently I was working with a page that was using jScrollpane inside of a &#8220;lightbox&#8221; iframe created via fancybox. Or, it was trying to. The problem was that even though we had this code inside of the iframe page: $(document).ready(function() { $("#my-scroll-pane").jScrollPane(); }); In firefox, the scroll pane never showed up, and clicking on links [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I was working with a page that was using <a href="http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html">jScrollpane</a> inside of a &#8220;lightbox&#8221; iframe created via <a href="http://fancybox.net/">fancybox</a>.  Or, it was trying to.  The problem was that even though we had this code inside of the iframe page:</p>
<pre>
$(document).ready(function() {
  $("#my-scroll-pane").jScrollPane();
});
</pre>
<p>In firefox, the scroll pane never showed up, and clicking on links inside the page to call it again also produced no results.</p>
<p>Luckily, firebug exists and I was able to discover that the div we were attempting to turn into a scroll pane had a javascript-calculated width and height of 0.  Debugging the actual jScrollpane.js file and following its path in calculating these values showed that when it was attempting to find the innerWidth/innerHeight of the div, it was getting the answer of 0, so that&#8217;s what it used.  </p>
<p>Thankfully someone had a similar problem and had filed a bug <a href="http://code.google.com/p/jscrollpane/issues/detail?id=123">here</a>.  Essentially the problem is, as Kevin Luck described, that while the iframe is loading it is not visible, and so jS<span id="more-90"></span>crollpane gets innerWidth and innerHeight of 0.  The solution that is suggested is to utilize a callback method of the fancybox library, <code>callbackOnShow</code> which is called when the content *is* visible.  For some reason, merely calling the jScrollpane code inside of this callback was still was a bit wonky, so I bound it to the load event and all was well:</p>
<pre>
'callbackOnShow': function() { 
  jQuery('#fancy_frame').bind("load", function() {   
    jQuery('#fancy_frame').contents().find('#my-scroll-pane').jScrollPane();
  }
}</pre>
<p>(Note: I&#8217;m really not sure why, but this is the only way I could get this to work via binding on load.  E.g., if I put the code inside of the iframe&#8217;s source inside of $(window).bind(&#8220;load&#8221;) code block, it still exhibits the undesired behavior.  It&#8217;s a mystery to me, but this works anyhow!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.waitingforthefuture.org/2010/07/12/jscrollpane-and-iframefancybox-woes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Compiling tcpdump for tomato firmware</title>
		<link>http://www.waitingforthefuture.org/2009/12/25/compiling-tcpdump-for-tomato-firmware/</link>
		<comments>http://www.waitingforthefuture.org/2009/12/25/compiling-tcpdump-for-tomato-firmware/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 09:24:13 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[compiling]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[packet sniffing]]></category>
		<category><![CDATA[sniffing]]></category>
		<category><![CDATA[tcpdump]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[wireless]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.waitingforthefuture.org/?p=10</guid>
		<description><![CDATA[I love my tomato-backed linksys WRT45GL router, but I had a very hard time determining how to get tcpdump onto it as it doesn&#8217;t come in the default image. I had read that openwrt came with it, or at least came with it as an optional package, though I didn&#8217;t want to give up the [...]]]></description>
				<content:encoded><![CDATA[<p>I love my <a href="http://www.polarcloud.com/tomato">tomato</a>-backed linksys WRT45GL router, but I had a very hard time determining how to get tcpdump onto it as it doesn&#8217;t come in the default image.  I had read that <a href="http://openwrt.org/">openwrt</a> came with it, or at least came with it as an optional package, though I didn&#8217;t want to give up the niceties of tomato as well as my familiarity with it and trade it in for openwrt just to get tcpdump.  Luckily, I don&#8217;t have to!  There may be a more elegant solution to do this than the solution I found, but after hours of searching I only found one linked binary to tcpdump which was not only not from a trusted source, but also was dynamically linked to a library that tomato didn&#8217;t have installed.  Double-doh.  Here is how I finally accomplished it:</p>
<p><span style="color: #800000; font-size: smaller;">WARNING: Openwrt requires a case-sensitive filesystem!  Default MacOS and Windows partitions are case-<strong>in</strong>sensitive so it will not work, and <code>make menuconfig</code> will tell you as much.</span></p>
<pre><code class="bash">$ svn checkout svn://svn.openwrt.org/openwrt/trunk openwrt-kamikaze
$ cd openwrt-kamikaze/scripts
$ ./feeds update
$ ./feeds install tcpdump
$ cd ../
$ make menuconfig
</code></pre>
<p><a href="http://www.waitingforthefuture.org/wp-content/uploads/2009/12/Picture-16.png" class="image"><img class="center" height="317" width="462" title="make menuconfig" src="http://www.waitingforthefuture.org/wp-content/uploads/2009/12/Picture-16.png" alt="make menuconfig screen" /></a></p>
<p>If you have ever compiled your own kernel before, this screen should look somewhat familiar.  Either way, go into the &#8220;Network&#8221; subsection and select tcpdump, hit the spacebar until an &#8220;M&#8221; shows next to it, indicating that it will be built but not built directly into the image.  Exit out of all the screens until it asks you if you want to save your configuration and select yes.</p>
<p>The last thing you need to do is make sure that tcpdump compiles with static libraries, because the libraries it needs are most likely not on your router now. (If you compiled it dynamically it would most likely result in this kind of error when trying to run it: <code class="bash">./tcpdump: can't load library 'libpcap.so.1.0'</code>)   To compile it statically linked, edit the file <code>feeds/packages/net/tcpdump/Makefile</code> and add <code>-static</code> to the CCOPT, like so:</p>
<pre><code class="bash">define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CCOPT="<strong>-static</strong> $(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                $(MAKE_FLAGS) \
                all install
endef</code></pre>
<p>Now just type <code>make</code> in the parent directory of openwrt and wait a while.  It will go through and compile the cross-compiler as well as the image and some other stuff you won&#8217;t be using (if anyone knows how to just compile the stuff that&#8217;s necessary, please comment!  Otherwise, this will do just fine.)  Once it is complete, you will probably want to isolate tcpdump from everything else, so to do something like copying it to /tmp/tcpdump just run something like this:</p>
<pre><code class="bash">$ find ./staging_dir/ -name tcpdump -exec cp {} /tmp/tcpdump \;</code></pre>
<p>To ensure that the file was compiled properly and statically, run the following command and you should receive the following response</p>
<pre><code class="bash">$ file /tmp/tcpdump
/tmp/tcpdump: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped</code></pre>
<p>Once you have tcpdump compiled, you will need to put it onto your tomato-backed router.  To do that, go to the administration page for the wireless router, select &#8220;Administration&#8221; and ensure that the SSH daemon starts up.  You will ssh in as root, using the same password setup to access the administration interface via HTTP.  Before you do that, however, under the &#8220;Administration&#8221; tab that is now open, click on &#8220;JFFS2&#8243;.  If not enabled, click on &#8220;Enable&#8221; and &#8220;Format/Erase&#8221;.  Once this is done, there should be a device mounted on your wireless router when you login, like so:</p>
<pre><code class="bash"># mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
/proc on proc type rw (0)
/tmp on ramfs type rw (0)
/dev/mtdblock/3 on /jffs type jffs2 (rw,noatime,nodiratime)</code></pre>
<p>The JFFS2 partition is quite small (1.0M on my router), but will be large enough to hold tcpdump.  This is a place for files that will permanently stay on your router through reboots and the like.  If you were to put tcpdump in <code>/root</code>, for example, it would be gone the next time you rebooted.</p>
<p>Now that you have JFFS2 and ssh enabled, simply scp the tcpdump binary to /jffs on the wireless router and you should be able to execute it.</p>
<p>Unfortunately, again due to the storage limits on the wireless router, if you intend to save the output of tcpdump to a file (for example, to examine with wireshark later, etc), you will likely need to enable the &#8220;CIFS Client&#8221; under the same Administration tab that JFFS2 and ssh were inside of.  The CIFS Client is essentially a SMB client, so you can use it to mount a samba share, windows share, mac os share shared via SMB, and so on.  Under the /cifs1 entry, the UNC will be the familiar SMB url to the share, for example:</p>
<p><code>\\192.168.1.2\myshare</code></p>
<p>Fill in the username/password/etc as necessary.  Once it is enabled and saved and the router mounts it, you should have a /cifs1 entry in your mounted devices list, and you can use it to save your tcpdump files to.  For example:</p>
<pre><code class="bash"># /jffs2/tcpdump -s 1500 -w /cifs1/mynetwork.out</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.waitingforthefuture.org/2009/12/25/compiling-tcpdump-for-tomato-firmware/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Getting squeezeboxserver to run on upgraded Ubuntu karmic</title>
		<link>http://www.waitingforthefuture.org/2009/12/19/getting-squeezeboxserver-to-run-on-upgraded-ubuntu-karmic/</link>
		<comments>http://www.waitingforthefuture.org/2009/12/19/getting-squeezeboxserver-to-run-on-upgraded-ubuntu-karmic/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 22:29:53 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[squeezebox]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.waitingforthefuture.org/?p=3</guid>
		<description><![CDATA[Once I updated my server to karmic, squeezeboxserver was having a problem due to requiring mysql-server-5.0... To fix this I edited the debian package and changed the dependencies for squeezeboxserver.]]></description>
				<content:encoded><![CDATA[<p>Once I upgraded my Ubuntu server to karmic, squeezeboxserver was having a problem due to requiring mysql-server-5.0 specifically.  I had mysql-server-5.0 before, and karmic updated to mysql-server-5.1 so this was an error that wasn&#8217;t actually a problem, other than the dependency in the package being too strict.  To fix this I edited the debian package and changed the dependencies for squeezeboxserver.</p>
<p><code>dpkg-deb -x squeezeboxserver_7.4.1_all.deb src/<br />
dpkg-deb -e squeezeboxserver_7.4.1_all.deb src/DEBIAN</code></p>
<p>Now edit the control file in <code>src/DEBIAN/control</code> and remove all mysql dependencies.  The <code>Depends</code> line should look like this:</p>
<p><code>Depends: perl (>= 5.8.8), adduser</code></p>
<p>Go back down to the directory below src/ and run:</p>
<p><code>dpkg-deb -b src/ squeezeboxserver_7.4.1_new.deb</code></p>
<p>It will build you a new package, and you can install it with <code>dpkg -i</code> like normal.  There are probably some other ways to fix it, but this one was pretty simple for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.waitingforthefuture.org/2009/12/19/getting-squeezeboxserver-to-run-on-upgraded-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
