<?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>BenV&#039;s notes &#187; opera</title>
	<atom:link href="http://notes.benv.junerules.com/tag/opera/feed/" rel="self" type="application/rss+xml" />
	<link>http://notes.benv.junerules.com</link>
	<description>Rants and notes</description>
	<lastBuildDate>Wed, 28 Jul 2010 13:36:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Opera + Squid -&gt; slow?!</title>
		<link>http://notes.benv.junerules.com/all/software/opera-squid-slow/</link>
		<comments>http://notes.benv.junerules.com/all/software/opera-squid-slow/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 13:36:21 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=834</guid>
		<description><![CDATA[This tiny issue showed up a while ago, and I&#8217;m not quite sure when exactly it started. It sure was very annoying. The problem: Start opera, then load a ton of stuff at the same time. (your 25 tabs that have to be restored for instance). What happened was that after loading a few pages [...]]]></description>
			<content:encoded><![CDATA[<p>This tiny issue showed up a while ago, and I&#8217;m not quite sure when exactly it started. It sure was very annoying.</p>
<p>The problem:<br />
Start opera, then load a ton of stuff at the same time. (your 25 tabs that have to be restored for instance). What happened was that after loading a few pages<br />
partially, the rest would completely stall.</p>
<p>After some cursing I found out that it only happened when I used my squid proxy. (you know, to <a href="http://notes.benv.junerules.com/all/software/browser-ad-blocking/">filter out ads because they slow the stuff down</a>).<br />
First I figured it must be squid. Then I realized that it would be weird, since nothing really changed. Maybe the blocklist? Nope, all looked fine.</p>
<p>Apparently Opera only uses a limited amount of connections to the proxy, so when a few of those requests are slow (you know, because google analytics takes 6 years to get through) the requests stack up and completely halt the process. Brilliant.</p>
<p>Finally I found the solution in <a href="opera:config#Proxy">some obscure configuration panel</a>. Look for <span style="color:#FF00FF">Enable HTTP 1.1 for proxy</span> and make sure it&#8217;s enabled. Thanks for messing that up for me opera!<br />
Oh well, now it&#8217;s fast again. phew.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/opera-squid-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 update!</title>
		<link>http://notes.benv.junerules.com/all/software/wordpress-3-0-update/</link>
		<comments>http://notes.benv.junerules.com/all/software/wordpress-3-0-update/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 09:24:39 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=812</guid>
		<description><![CDATA[Since I was in another update mood I decided to take a quick look at my notes. The admin page mentioned something about the new 3.0 version. Obviously I immediately became very excited and ran to the bathroom. After screaming for half an hour I made a backup of the wordpress dir and sql and [...]]]></description>
			<content:encoded><![CDATA[<p>Since I was in another update mood I decided to take a quick look at my notes.<br />
The admin page mentioned something <a href="http://wordpress.org/development/2010/06/thelonious/">about the new 3.0 version</a>.<br />
Obviously I immediately became very excited and ran to the bathroom.<br />
After screaming for half an hour I made a backup of the wordpress dir and sql and wondered if the auto-upgrade button would work.<br />
Always a surprise&#8230;. but it worked! It actually worked!<span id="more-812"></span></p>
<p>Suddenly the admin page looked slightly different (round corners in opera, that kind of rubbish), yet still exactly the same.<br />
Oh well. They have a better updates overview now though. So I also decided to update the theme. Which restored a stupid<br />
&#8220;swear at wordpress&#8221; box that I molested in the previous version. &#8220;Oh yeah, now I remember&#8230;&#8221;. (note that this is simply the theme<br />
that has that stupid box there).</p>
<div id="attachment_816" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/06/wordpress3-pixel-theme.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/06/wordpress3-pixel-theme-300x129.png" alt="WordPress 3.0 Pixel Theme v2.0.2 with stupid welcome box" title="WordPress 3.0 Pixel Theme v2.0.2 with stupid welcome box" width="300" height="129" class="size-medium wp-image-816" /></a><p class="wp-caption-text">WordPress 3.0 Pixel Theme v2.0.2 with stupid welcome box</p></div>
<h5>&#8230; when trying to insert an image here I found out that the new wordpress actually destroyed the image upload dialog.<br />
Obviously it&#8217;s only broken in the Opera version I&#8217;m using, so it&#8217;s probably them&#8230; but still&#8230; *rage*&#8230;</h5>
<p>In other words, a good time to try out what they call <a href="http://codex.wordpress.org/Child_Themes">Child Themes</a>.<br />
If done correctly this supposedly prevents further updates to the theme from reintroducing this box. Unless they do something<br />
silly of course, like adding a new box in a different template.<br />
Here goes!</p>
<p>First we create a dir for the theme, it can be named whatever you like.<br />
Then we create a <span style="color:#FF00FF">style.css</span> file.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>wordpress:~<span style="color: #000000; font-weight: bold;">/</span>public_html$ <span style="color: #7a0874; font-weight: bold;">cd</span> wp-content<span style="color: #000000; font-weight: bold;">/</span>themes<span style="color: #000000; font-weight: bold;">/</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>wordpress:~<span style="color: #000000; font-weight: bold;">/</span>public_html<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>themes$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> benv-pixel <br />
benv<span style="color: #000000; font-weight: bold;">@</span>wordpress:~<span style="color: #000000; font-weight: bold;">/</span>public_html<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>themes$ <span style="color: #7a0874; font-weight: bold;">cd</span> benv-pixel<br />
benv<span style="color: #000000; font-weight: bold;">@</span>wordpress:~<span style="color: #000000; font-weight: bold;">/</span>public_html<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>themes<span style="color: #000000; font-weight: bold;">/</span>benv-pixel$ <span style="color: #c20cb9; font-weight: bold;">vim</span> style.css</div></div>
<p>The style file can be very empty, basically it imports the parent theme and optionally overrides things:</p>
<div class="codecolorer-container css vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">/*<br />
Theme Name: &nbsp; &nbsp; BenV's Pixel Child Theme<br />
Theme URI: &nbsp; &nbsp; &nbsp;http: //notes.benv.junerules.com/<br />
Description: &nbsp; &nbsp;Child theme for the Pixel theme<br />
Author: &nbsp; &nbsp; &nbsp; &nbsp; BenV<br />
Author URI: &nbsp; &nbsp; http://notes.benv.junerules.com/<br />
Template: &nbsp; &nbsp; &nbsp; pixel<br />
Version: &nbsp; &nbsp; &nbsp; &nbsp;1.0.0<br />
*/</span><br />
<br />
<span style="color: #a1a100;">@import url(&quot;../pixel/style.css&quot;);</span></div></div>
<p>Make sure to correctly name the template (case sensitive) that you base the theme on, in our case <span style="color:#00FFFF">pixel</span>.</p>
<p>Well, so far so good, but this doesn&#8217;t actually change anything. What we want to get rid of is a stupid box that apparently is in the<br />
<span style="color:#00FF88">welcome.php</span> file of the pixel theme. In fact, <span style="color:#00FF88">welcome.php</span> pretty much is the entire thing that annoys me.<br />
So let&#8217;s create our own <span style="color:#00FF88">welcome.php</span> file:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// This is BenV's welcome.php file. Yes, it's empty. Good riddance.</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>Easy huh?</p>
<p>Now you can go to the Admin panel -> themes and then you&#8217;ll see your child theme right there.<br />
<div id="attachment_817" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/06/benv-wordpress-theme.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/06/benv-wordpress-theme-300x282.png" alt="BenV&#039;s WordPress Pixel Child Theme" title="BenV&#039;s WordPress Pixel Child Theme" width="300" height="282" class="size-medium wp-image-817" /></a><p class="wp-caption-text">BenV's WordPress Pixel Child Theme</p></div><br />
Activate it (or preview it first to be sure), and we&#8217;re done.</p>
<p>However, things never work as intended, so this fails. *sigh*. Nice try WordPress.<br />
When we look into this matter, we notice that the pixel theme doesn&#8217;t really have a <span style="color:#00FF88">welcome.php</span> template.<br />
What it does have is a <span style="color:#88FF33">sidebar.php</span> template, which includes the <span style="color:#00FF88">welcome.php</span> from its own template path.<br />
In order words: we can&#8217;t override <span style="color:#00FF88">welcome.php</span> (until they fix the Pixel theme), but we have to override the <span style="color:#88FF33">sidebar.php</span> file.</p>
<p>Here goes:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>wordpress:~<span style="color: #000000; font-weight: bold;">/</span>public_html<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>themes<span style="color: #000000; font-weight: bold;">/</span>benv-pixel$ <span style="color: #c20cb9; font-weight: bold;">cp</span> ..<span style="color: #000000; font-weight: bold;">/</span>pixel<span style="color: #000000; font-weight: bold;">/</span>sidebar.php .<br />
benv<span style="color: #000000; font-weight: bold;">@</span>wordpress:~<span style="color: #000000; font-weight: bold;">/</span>public_html<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>themes<span style="color: #000000; font-weight: bold;">/</span>benv-pixel$ <span style="color: #c20cb9; font-weight: bold;">vim</span> sidebar.php<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Remove lines 6-8, they look like this:</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># &lt;li&gt;</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># &lt;?php include (TEMPLATEPATH . '/welcome.php'); ?&gt;</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># &lt;/li&gt;</span><br />
:wq</div></div>
<p>Yay! It works!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/wordpress-3-0-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flashblock for opera</title>
		<link>http://notes.benv.junerules.com/all/software/flashblock-for-opera/</link>
		<comments>http://notes.benv.junerules.com/all/software/flashblock-for-opera/#comments</comments>
		<pubDate>Sun, 23 May 2010 14:27:51 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flashblock]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[userjs]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=805</guid>
		<description><![CDATA[Another note in case I forget. Since allowing flash by default slows browsing (and my PC) to a crawl, this nifty little script converts all flash content on a page to a flash icon. Download it, stash it in your opera UserJS dir. (See Preferences -> Advanced -> Content -> Javascript Options -> User JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p>Another note in case I forget.<br />
Since allowing flash by default slows browsing (and my PC) to a crawl, <a href="http://ruzanow.ru/userjs/FlashBlock.js">this nifty little script</a> converts all flash content on a page to a flash icon.<br />
Download it, stash it in your opera <a href="http://www.opera.com/docs/userjs/">UserJS</a> dir. (See Preferences -> Advanced -> Content -> Javascript Options -> User JavaScript Folder).<span id="more-805"></span></p>
<p>Youtube before:<br />
<div id="attachment_806" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/05/flashblock.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/05/flashblock-300x164.png" alt="youtube before flashblock script" title="Youtube Before Flashblock.js" width="300" height="164" class="size-medium wp-image-806" /></a><p class="wp-caption-text">Youtube Before Flashblock.js</p></div><br />
Youtube after:<br />
<div id="attachment_807" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/05/flashblock-2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/05/flashblock-2-300x127.png" alt="Youtube After Flashblock.js" title="Youtube After Flashblock.js" width="300" height="127" class="size-medium wp-image-807" /></a><p class="wp-caption-text">Youtube After Flashblock.js</p></div></p>
<p>Simply click on it if you are sure you want to load it, and it&#8217;ll look like &#8220;Youtube Before&#8221; again <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Did I mention this kill most flash ads? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S. The userjs dir can also be used to put GreaseMonkey scripts in. You might have to rename them because the script must end with .user.js for this to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/flashblock-for-opera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Default Tools installation &#8211; Ninite</title>
		<link>http://notes.benv.junerules.com/all/software/windows-default-tools-installation-ninite/</link>
		<comments>http://notes.benv.junerules.com/all/software/windows-default-tools-installation-ninite/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 16:56:58 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=749</guid>
		<description><![CDATA[Windows and Ninite So after the Adobe Cancer experience yesterday I still had to install a bunch of other things for the helpless windows user. After I was done with most of that (of course, the good stuff always comes too late) I ran into this tool: Ninite. They call it &#8220;The easiest way to [...]]]></description>
			<content:encoded><![CDATA[<h3>Windows and Ninite</h3>
<p>So after the <a href="http://notes.benv.junerules.com/all/software/the-adobe-cancer/">Adobe Cancer</a> experience yesterday I still had to install a bunch of other things for the helpless windows user.<br />
After I was done with most of that (of course, the good stuff always comes too late) I ran into this tool: <a href="https://ninite.com/">Ninite</a>.<br />
They call it &#8220;The easiest way to get apps&#8221;. Well, from the screenshots it certainly looks that way. No cruft like toolbars and updaters and junk installed, just the application.<span id="more-749"></span></p>
<p>On their page you simply select the application you want installed, including the obvious things as Firefox, OpenOffice, Cancerbat^WAdobe Reader, and even Avast antivirus. The only thing really missing from their list is <a href="http://www.ghisler.com/">Total Commander</a> (yes, I stuffed it in their suggestions box <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ), which is pretty much the only application I really miss on linux.<br />
After selecting all the rubbish the user might need you downloader their installer. When you run the installer it downloads and installs all the selected applications.<br />
Easy huh?</p>
<p>The installer looks like this:<br />
<div id="attachment_753" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/03/ninite-opera-install.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/03/ninite-opera-install-300x225.png" alt="Ninite installing opera while downloading the rest" title="Ninite installing opera while downloading the rest" width="300" height="225" class="size-medium wp-image-753" /></a><p class="wp-caption-text">Ninite installing opera while downloading the rest</p></div><br />
And indeed, <span style="color:#FF00FF">IT JUST WORKS</span>. Excellent.</p>
<h3>Ninite and Wine</h3>
<p>Now for the fun part. Let&#8217;s see how it works under wine <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Knowing Putty should work under wine, I selected that and winscp on the website.<br />
<div id="attachment_751" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/03/35.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/03/35-300x184.png" alt="Ninite download for putty and winscp" title="Ninite website" width="300" height="184" class="size-medium wp-image-751" /></a><p class="wp-caption-text">Ninite download for putty and winscp</p></div></p>
<p>However, trying to run the installer fails after it shows the progressbar bouncing a few times with a useless error:<br />
<div id="attachment_755" class="wp-caption alignnone" style="width: 142px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/03/43.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/03/43.png" alt="Ninite wine error" title="Ninite wine error" width="132" height="89" class="size-full wp-image-755" /></a><p class="wp-caption-text">Ninite wine error</p></div><br />
The wine console gives a bunch of SSL errors, probably related:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">trace:wininet:HTTP_HttpSendRequestW Request header -<span style="color: #000000; font-weight: bold;">&gt;</span> L<span style="color: #ff0000;">&quot;GET /getinstaller?key=00b6ea6210077170ba6d7e0f70317368fda80ae0&amp;version=0%2C1%2C0%2C267&amp;compressed=1&amp;id=9218220A781C9E27B4B4D7CB3CC8AFCB4C7FA19E HTTP/1.1<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>Accept: */*<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>Host: ninite.com<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><br />
trace:wininet:HTTP_OpenConnection --<span style="color: #000000; font-weight: bold;">&gt;</span><br />
trace:wininet:GetAddress L<span style="color: #ff0000;">&quot;ninite.com&quot;</span><br />
trace:wininet:HTTP_ResolveName resolved L<span style="color: #ff0000;">&quot;ninite.com&quot;</span> to 69.164.199.133<br />
err:wininet:NETCON_secure_connect SSL_connect failed: <span style="color: #000000;">12157</span><br />
warn:wininet:HTTP_OpenConnection Couldn<span style="color: #ff0000;">'t connect securely to host</span></div></div>
<p>That was with wine version 1.1.40. I even tried installing wininet.dll through winetricks, but then it fails with a slightly different error about an invalid server response.<br />
Oh well, too bad for that (it was just for fun anyway), but it&#8217;s a great tool for windows <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Keep up the good work Ninite guys!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/windows-default-tools-installation-ninite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript WTF</title>
		<link>http://notes.benv.junerules.com/all/fun/javascript-wtf/</link>
		<comments>http://notes.benv.junerules.com/all/fun/javascript-wtf/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 13:35:34 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=611</guid>
		<description><![CDATA[Last week at work we ran into this gem (click on the image to get it full screen): For reasons unknown to us, this piece of code acts very strange. First it evaluates selected == index which it considered to be false. (outlined in green in the image) So far so good. However, what it [...]]]></description>
			<content:encoded><![CDATA[<p>Last week at work we ran into this gem (click on the image to get it full screen):<br />
<div id="attachment_612" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/firebug-wtf.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/firebug-wtf-300x80.png" alt="Javascript wtf in firebug" title="Javascript wtf in firebug" width="300" height="80" class="size-medium wp-image-612" /></a><p class="wp-caption-text">Javascript wtf in firebug</p></div><span id="more-611"></span></p>
<p>For reasons unknown to us, this piece of code acts very strange. First it evaluates <code class="codecolorer javascript vibrant"><span class="javascript">selected <span style="color: #339933;">==</span> index</span></code> which it considered to be false. (outlined in green in the image) So far so good. However, what it does next is a real WTF.<br />
<span style="color:#FF00FF">Can someone explain to us why this code runs INTO the if statement?</span><br />
The <code class="codecolorer php vibrant"><span class="php"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> whatever <span style="color: #009900;">&#125;</span></span></code> part?<br />
Personally I&#8217;d expect the code to jump over the if block, since that&#8217;s what if statement are for. Skipping code unless the evaluation is true.<br />
Or explained a lot better <a href="http://en.wikipedia.org/wiki/Conditional_(programming)">on wikipedia</a>. However, what happens is that <em>whatever</em> is actually <em>executed</em>.</p>
<p>So after carefully inspecting this piece of code and saying obscene stuff, minds boggled, trying to find that hidden semicolon or whatever, we couldn&#8217;t find it. Maybe a browser bug? But both <a href="http://www.opera.com/">Opera</a> (version 10.10) and <a href="http://www.mozilla.com/firefox/">Firefox</a> (version 3.5.5) failed in the same way.<br />
Maybe some magic with jQuery? Whatever it is, it remains a mystery to us.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/fun/javascript-wtf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOCKS, Opera, and brute force</title>
		<link>http://notes.benv.junerules.com/all/software/socks-opera-and-brute-force/</link>
		<comments>http://notes.benv.junerules.com/all/software/socks-opera-and-brute-force/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 16:27:08 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=511</guid>
		<description><![CDATA[Especially force, that&#8217;s what we need. Because somehow Opera still hasn&#8217;t bothered to implement SOCKS proxy support. And if you would like to use&#8230; oh I don&#8217;t know&#8230; tor&#8230; or maybe simple ssh proxying support to test stuff from an external IP instead of from inside your local network, or for whatever your reason might [...]]]></description>
			<content:encoded><![CDATA[<p>Especially <span style="color:#FF0000">force</span>, that&#8217;s what we need.<br />
Because somehow <a href="http://www.opera.com/browser/download/" title="Get Opera">Opera</a> still hasn&#8217;t bothered to implement SOCKS proxy support. And if you would like to use&#8230; oh I don&#8217;t know&#8230; <a href="http://www.torproject.org/">tor</a>&#8230; or maybe simple <a href="http://notes.benv.junerules.com/daily/the-wonders-of-ssh-forwarding/" title="The wonders of SSH forwarding">ssh proxying support</a> to test stuff from an external IP instead of from inside your local network, or for whatever your reason might be (working around your corperate firewall? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )&#8230;. you have to use <a href="http://www.mozilla.com/en-US/firefox/firefox.html?from=BenVsNotes" title="Get Firefox">Firefox</a>. Because they DO have SOCKS support. Strange. A case to bash Opera <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-511"></span></p>
<p>So <a href="http://www.opera.com/support/kb/view/194/" title="Opera Socks">Opera doesn&#8217;t suck^Wsocks</a>, huh.<br />
However, since I personally don&#8217;t like Firefox enough to recommend people using it over Opera, we&#8217;ll have to get socks support using an external program. There are several options for doing this. Bascially what we need is some method to catch the calls to the socket system call and converts them to go through the socks proxy. My expert google skills have found me 3 solutions:</p>
<ul>
<li><a href="http://sourceforge.net/projects/tsocks/" title="TSocks">Tsocks</a></li>
<li><a href="http://proxychains.sourceforge.net/" title="ProxyChains">Proxychains</a></li>
<li><a href="http://ksb.sourceforge.net/" title="Kernel Socks Bouncer">Kernel Socks Bouncer</a></li>
</ul>
<p>From this list <span style="color:#00FFFF">TSocks</span> sounds like the easiest one, even though it hasn&#8217;t been updated in _years_. Means either it works or it&#8217;s impossible to get to work these days <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Anyway, slackbuild didn&#8217;t have any issues building me a tsocks package. Let&#8217;s see if it works!<br />
First we create a little tsocks.conf file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># echo -e &quot;local = 192.168.1.0/24\nserver = 127.0.0.1\nserver_port = 1234&quot; &gt; /etc/tsocks.conf</span></div></div>
<p>This tells tsocks that we want to access the proxy for everything that isn&#8217;t in our LAN (192.168.1.0/24) using a server on 127.0.0.1 on port 1234. It&#8217;s picky about the whitespace around the &#8216;=&#8217; in the config though, don&#8217;t forget them. Now we have to enable tsocks, either by running the application by using the tsocks wrapper script, or by letting tsocks put itself in the LD_PRELOAD environment variable. I chose the latter:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># source tsocks on ; tsocks show &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><br />
ERROR: ld.so: object <span style="color: #ff0000;">'/usr/lib/libtsocks.so'</span> from LD_PRELOAD cannot be preloaded: ignored.<br />
<span style="color: #007800;">LD_PRELOAD</span>=<span style="color: #ff0000;">&quot;/usr/lib/libtsocks.so&quot;</span></div></div>
<p>*<span style="color:#00FF33"><b>BZZZT</b></span>* WRONG! That&#8217;s strike 1 for being an ancient (not updated for more than 5 years) piece of junk. I&#8217;m running a 64 bit OS, that means the library is inside /usr/lib64. Fine, we patch it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># sed -ie 's#/lib/#/lib64/#g; s#\\/lib\\/#\\/lib64\\/#g' /usr/bin/tsocks</span></div></div>
<p>If you&#8217;re getting errors about that /usr/lib/libtsocks.so not being found, unset your LD_PRELOAD variable <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Good, time for a test!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-D</span> <span style="color: #000000;">1234</span> <span style="color: #660033;">-N</span> some.host.to.proxy.with<br />
benv<span style="color: #000000; font-weight: bold;">@</span>some.host.to.proxy.with<span style="color: #ff0000;">'s password: ******<br />
# SSH is forwarding but doesn'</span>t take commands from you now, leave it, switch to another terminal and <span style="color: #7a0874; font-weight: bold;">continue</span> there<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #7a0874; font-weight: bold;">source</span> tsocks on ; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'GET / HTTP/1.0\r\nHost: www.whatismyip.crg \n\r\n'</span> <span style="color: #000000; font-weight: bold;">|</span> nc www.whatismyip.org <span style="color: #000000;">80</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span><br />
123.456.789.012</div></div>
<p>It works! In order to make Opera use it simply start it like that:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #7a0874; font-weight: bold;">source</span> tsocks on ; opera</div></div>
<p><b>NEXT! ProxyChains</b><br />
&#8220;Q: Why use it in the first place? Tsocks works!&#8221;<br />
A: Because it&#8217;s always good to have more than 1 tool available to use. Because its latest version is not 7 years old (only 2 *cough*). Because it has other features. Because it&#8217;s fun to test shit <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Chalk down another success for slackbuild. Next, the configuration file. <span style="color:#3000FF">/etc/proxychains.conf</span> is automagically installed, so we only have to adapt it if we choose to. The default config should work for <b>tor</b>, but we want it for my SSH proxy. I changed the default proxy at the end of the file to be &#8216;socks5 127.0.0.1 1234&#8242;. Note that it has the cool features to use several proxies (hence the name I suppose) in a chain (randomly if wanted) and also to proxy DNS. Anyway, the test (after unsettings the LD_PRELOAD variable!):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'GET / HTTP/1.0\r\nHost: www.whatismyip.crg \n\r\n'</span> <span style="color: #000000; font-weight: bold;">|</span> proxychains nc www.whatismyip.org <span style="color: #000000;">80</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-1</span><br />
<span style="color: #000000; font-weight: bold;">|</span>DNS-request<span style="color: #000000; font-weight: bold;">|</span> www.whatismyip.org <br />
<span style="color: #000000; font-weight: bold;">|</span>S-chain<span style="color: #000000; font-weight: bold;">|</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;</span>-127.0.0.1:<span style="color: #000000;">1234</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-4.2.2.2:<span style="color: #000000;">53</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-OK<br />
<span style="color: #000000; font-weight: bold;">|</span>DNS-response<span style="color: #000000; font-weight: bold;">|</span> www.whatismyip.org is 75.147.234.41<br />
<span style="color: #000000; font-weight: bold;">|</span>S-chain<span style="color: #000000; font-weight: bold;">|</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;</span>-127.0.0.1:<span style="color: #000000;">1234</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-75.147.234.41:<span style="color: #000000;">80</span>-<span style="color: #000000; font-weight: bold;">&lt;&gt;&lt;&gt;</span>-OK<br />
123.456.789.123</div></div>
<p>Cool, another working solution. Note how it proxied the DNS request for us. Also I find this one easier to use than tsocks.</p>
<p>Finally there&#8217;s this Kernel Socks Bouncer module, but it&#8217;s too much of a hassle for me to run kernel modules for a simple socks proxy. Let me know if it&#8217;s great if you used it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Thanks for reading folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/socks-opera-and-brute-force/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash64</title>
		<link>http://notes.benv.junerules.com/all/software/flash64/</link>
		<comments>http://notes.benv.junerules.com/all/software/flash64/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 10:56:52 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=113</guid>
		<description><![CDATA[In case I forget it again, the !@#$()*@$%*#$ product called &#8220;flash&#8221; has a 64 bit plugin at http://labs.adobe.com/downloads/flashplayer10.html Works in opera, just trash it into /usr/lib/opera/plugins&#8230;. why is that /usr/lib and not lib64? It&#8217;ll also use it from the mozilla dir, /usr/lib64/mozilla/plugins.]]></description>
			<content:encoded><![CDATA[<p>In case I forget it again, the !@#$()*@$%*#$ product called &#8220;flash&#8221; has a 64 bit plugin at <a title="Molest your browser" href="http://labs.adobe.com/downloads/flashplayer10.html" target="_self">http://labs.adobe.com/downloads/flashplayer10.html</a></p>
<p>Works in opera, just trash it into /usr/lib/opera/plugins&#8230;. why is that /usr/lib and not lib64? It&#8217;ll also use it from the mozilla dir, /usr/lib64/mozilla/plugins.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/flash64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
