<?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>~ overflow ~ &#187; Hack</title>
	<atom:link href="http://www.overflow.biz/blog/lang/en-us/tag/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.overflow.biz/blog</link>
	<description>Coding and Internet Randomness</description>
	<lastBuildDate>Sun, 08 Jan 2012 23:34:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en-us</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Blue Soleil 6.4.249</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2010/04/16/blue-soleil-6-4-249?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=blue-soleil-6-4-249</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2010/04/16/blue-soleil-6-4-249#comments</comments>
		<pubDate>Fri, 16 Apr 2010 20:54:07 +0000</pubDate>
		<dc:creator>z3n</dc:creator>
				<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[blue soleil]]></category>
		<category><![CDATA[blue tooth]]></category>
		<category><![CDATA[crack]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[warez]]></category>

		<guid isPermaLink="false">http://www.overflow.biz/blog/?p=384</guid>
		<description><![CDATA[Problem:
Alright, this is not the type of posting you would probably see on this blog so much, since this is no warez blog.
What happens is that blue soleil is really annoying software, not only because they DON&#8217;T allow old registered users to upgrade for free, but also because the program itself sucks. Since my bluetooth [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong></p>
<p>Alright, this is not the type of posting you would probably see on this blog so much, since this is no warez blog.</p>
<p>What happens is that blue soleil is really annoying software, not only because they DON&#8217;T allow old registered users to upgrade for free, but also because the program itself sucks. Since my bluetooth device ONLY works with blue soleil i must have this working with that crappy program.</p>
<p><strong>Solution:</strong></p>
<p>On windows 7, the version they provided me, 1.6 simply don&#8217;t work, also many things are wrong with that version, basically you can only have the most primitive bluetooth access working without crashing it. I can&#8217;t upgrade for free, and the trial only gives me 2mb of data transferred. Windows 7 native bluetooth support is a joke, so i&#8217;m not commenting it.</p>
<p>After searching a lot i&#8217;ve found several versions of the 6.4.xxx none of they worked, no torrents worked and the cracks were useless.</p>
<p>Until i found 6.4.249 on a hidden comment somewhere.</p>
<p>Here&#8217;s the <a href="http://www.4shared.com/file/Ux5UF5ww/IVT_BlueSoleil_64249.html?cau2=403tNull" target="_blank">link</a> to download the working version (32/64 bit, Windows 7 tested).</p>
<p>Oh so cool, now i can use my headphones again!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2010/04/16/blue-soleil-6-4-249/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Overriding MySql Max Connections</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2010/04/06/overriding-mysql-max-connections?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=overriding-mysql-max-connections</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2010/04/06/overriding-mysql-max-connections#comments</comments>
		<pubDate>Tue, 06 Apr 2010 19:54:43 +0000</pubDate>
		<dc:creator>z3n</dc:creator>
				<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[max connections]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqld]]></category>
		<category><![CDATA[server restart]]></category>

		<guid isPermaLink="false">http://www.overflow.biz/blog/?p=373</guid>
		<description><![CDATA[Problem:
MySQL has reached max connections and you can&#8217;t login, even being root.
Solution:
You can either edit my.cnf raising the limit and logging in or you can do this hack:
gdb -p $(cat /var/run/mysqld/mysqld.pid) \
-ex &#34;set max_connections=5000&#34; -batch
What&#8217;s the difference?
By changing my.cnf you will need to restart the server, if you got the limit reached long time ago [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong><br />
MySQL has reached max connections and you can&#8217;t login, even being root.</p>
<p><strong>Solution:</strong><br />
You can either edit <strong>my.cnf</strong> raising the limit and logging in or you can do this hack:</p>
<pre class="brush: bash;">gdb -p $(cat /var/run/mysqld/mysqld.pid) \
-ex &#34;set max_connections=5000&#34; -batch</pre>
<p>What&#8217;s the difference?</p>
<p>By changing my.cnf you will need to restart the server, if you got the limit reached long time ago lots of queued connections will instantly flood the server once you reset it, making impossible to access it within a few seconds. So you will need to keep restarting it over and over again until all the queue is gone. In some cases you can&#8217;t even restart it, server gets stuck trying to close connections, then you need to kill mysqld, but that can generate broken tables. Sometimes only a full system restart fixes the issue.</p>
<p>By changing the value with the hack, you will be able to raise the max connections without restarting mysqld, which allows you to login and check what&#8217;s going on, even run some scripts to clean up idle/stuck connections, making things easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2010/04/06/overriding-mysql-max-connections/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Google Search &#8220;API&#8221; by PHP (No API Needed)</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2009/06/16/custom-google-search-api-by-php-no-api-needed?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=custom-google-search-api-by-php-no-api-needed</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2009/06/16/custom-google-search-api-by-php-no-api-needed#comments</comments>
		<pubDate>Wed, 17 Jun 2009 02:16:52 +0000</pubDate>
		<dc:creator>z3n</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-dom]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://overflow.biz/blog/?p=154</guid>
		<description><![CDATA[



Problem:
I was looking for an API to do searches by google using a custom made php script, so i could display the results the way i want. I found out about a google search api that work with SOAP, however it&#8217;s been deprected and they only have the useless AJAX option, which don&#8217;t really serve [...]]]></description>
			<content:encoded><![CDATA[



<p><span lang="en-us"><strong>Problem:</strong></span></p>
<p><span lang="en-us">I was looking for an API to do searches by google using a custom made php script, so i could display the results the way i want. I found out about a <em>google search api</em> that work with SOAP, however it&#8217;s been deprected and they only have the useless AJAX option, which don&#8217;t really serve my propouse since the searches would be client-side processed at AJAX, and i needed them server-side processed.</span></p>
<p><span lang="en-us"><strong>Solution:</strong></span></p>
<p><span lang="en-us">This might looks like a hack, but there&#8217;s nothing much else we can do, although, for me, it was much easier than doing the research on the original api and finally finding out it was deprected. This PHP script will do a regular request to google, then it will process the data using DOM, cut it removing google ads and other crap, and finally return only the urls of the search. This will also make you able to search on country specific google, just change the domain and filter to get the results you want.</span></p>
<p><span lang="en-us">So here&#8217;s the PHP source that don&#8217;t depend on google happyness to work:</span></p>
<div class="geshi no php">
<div class="head">// (c) z3n &#8211; R1V1@090616 &#8211; z3n666@gmail.com &#8211; www.overflow.biz</div>
<ol>
<li class="li1">
<div class="de1">&#160;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="sy0">!</span><span class="kw3">isset</span><span class="br0">&#40;</span><span class="re1">$argv</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> <span class="kw3">echo</span> <span class="st0">&#34;Usage: &#34;</span><span class="sy0">.</span><span class="re1">$_SERVER</span><span class="br0">&#91;</span><span class="st0">&#39;PHP_SELF&#39;</span><span class="br0">&#93;</span><span class="sy0">.</span><span class="st0">&#34; &#160;[start]&#34;</span><span class="sy0">;</span>die<span class="sy0">;</span> <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span> <span class="re1">$s</span><span class="sy0">=</span><span class="re1">$argv</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="sy0">;</span> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$e</span><span class="sy0">=</span><span class="br0">&#40;</span><span class="kw3">isset</span><span class="br0">&#40;</span><span class="re1">$argv</span><span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> ? <span class="st0">&#34;&#38;amp;start=&#34;</span><span class="sy0">.</span><span class="re1">$argv</span><span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span> <span class="sy0">:</span> <span class="st0">&#34;&#34;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$x</span><span class="sy0">=</span><span class="kw3">file_get_contents</span><span class="br0">&#40;</span><span class="st0">&#34;http://www.google.com/search?q=&#34;</span><span class="sy0">.</span><span class="re1">$s</span><span class="sy0">.</span><span class="st0">&#34;&#38;amp;num=100&#34;</span><span class="sy0">.</span><span class="re1">$e</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// apply DOM</span></div>
</li>
<li class="li1">
<div class="de1">&#160;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$dom</span><span class="sy0">=</span><span class="kw2">new</span> DOMDocument<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">@</span><span class="re1">$dom</span><span class="sy0">-&#38;</span>gt<span class="sy0">;</span>loadHTML<span class="br0">&#40;</span><span class="re1">$x</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$xpath</span><span class="sy0">=</span><span class="kw2">new</span> DOMXPath<span class="br0">&#40;</span><span class="re1">$dom</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$a</span><span class="sy0">=</span><span class="re1">$xpath</span><span class="sy0">-&#38;</span>gt<span class="sy0">;</span>evaluate<span class="br0">&#40;</span><span class="st0">&#34;/html/body//a&#34;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> <span class="br0">&#40;</span><span class="re1">$i</span><span class="sy0">=</span><span class="re1">$k</span><span class="sy0">=</span><span class="nu0">0</span><span class="sy0">;</span><span class="re1">$i</span><span class="sy0">&#38;</span>lt<span class="sy0">;</span><span class="re1">$a</span><span class="sy0">-&#38;</span>gt<span class="sy0">;</span>length<span class="sy0">;</span><span class="re1">$i</span><span class="sy0">++</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;<span class="re1">$y</span><span class="sy0">=</span><span class="re1">$a</span><span class="sy0">-&#38;</span>gt<span class="sy0">;</span>item<span class="br0">&#40;</span><span class="re1">$i</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;<span class="re1">$z</span><span class="sy0">=</span><span class="re1">$y</span><span class="sy0">-&#38;</span>gt<span class="sy0">;</span>getAttribute<span class="br0">&#40;</span><span class="st0">&#39;href&#39;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;<span class="co1">// filter out google crap, wikipedia and youtube</span></div>
</li>
<li class="li1">
<div class="de1">&#160;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re1">$z</span><span class="br0">&#123;</span><span class="nu0">0</span><span class="br0">&#125;</span> <span class="sy0">!=</span> <span class="st0">&#34;/&#34;</span><span class="br0">&#41;</span> <span class="sy0">&#38;</span>amp<span class="sy0">;&#38;</span>amp<span class="sy0">;</span> <span class="br0">&#40;</span><span class="kw3">strpos</span><span class="br0">&#40;</span><span class="re1">$z</span><span class="sy0">,</span><span class="st0">&#34;q=cache:&#34;</span><span class="br0">&#41;</span> <span class="sy0">===</span> <span class="kw2">false</span><span class="br0">&#41;</span> <span class="sy0">&#38;</span>amp<span class="sy0">;&#38;</span>amp<span class="sy0">;</span> <span class="br0">&#40;</span><span class="kw3">strpos</span><span class="br0">&#40;</span><span class="re1">$z</span><span class="sy0">,</span><span class="st0">&#34;youtube.com/&#34;</span><span class="br0">&#41;</span> <span class="sy0">===</span> <span class="kw2">false</span><span class="br0">&#41;</span> <span class="sy0">&#38;</span>amp<span class="sy0">;&#38;</span>amp<span class="sy0">;</span> <span class="br0">&#40;</span><span class="kw3">strpos</span><span class="br0">&#40;</span><span class="re1">$z</span><span class="sy0">,</span><span class="st0">&#34;wikipedia.org/&#34;</span><span class="br0">&#41;</span> <span class="sy0">===</span> <span class="kw2">false</span><span class="br0">&#41;</span> <span class="sy0">&#38;</span>amp<span class="sy0">;&#38;</span>amp<span class="sy0">;</span> <span class="br0">&#40;</span><span class="kw3">strpos</span><span class="br0">&#40;</span><span class="re1">$z</span><span class="sy0">,</span><span class="st0">&#34;.google.com/&#34;</span><span class="br0">&#41;</span> <span class="sy0">===</span> <span class="kw2">false</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&#160; <span class="re1">$_url</span><span class="br0">&#91;</span><span class="re1">$k</span><span class="br0">&#93;</span><span class="sy0">=</span><span class="re1">$z</span><span class="sy0">;</span><span class="re1">$k</span><span class="sy0">++;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&#160;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">print_r</span><span class="br0">&#40;</span><span class="re1">$_url</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">echo</span> <span class="st0">&#34;Found: &#34;</span><span class="sy0">.</span><span class="re1">$k</span><span class="sy0">.</span><span class="st0">&#34; urls.&#34;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
<p><span lang="en-us">* Note: You need DOM Object support in order to run this script; This example has been developed to accept input from the CLI, you can easly change it to work inside your script or/and accept $_GET or $_POST.</span></p>
<p><span lang="en-us"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2009/06/16/custom-google-search-api-by-php-no-api-needed/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An old CSS Trick</title>
		<link>http://www.overflow.biz/blog/lang/en-us/2008/05/30/an-old-css-trick?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=an-old-css-trick</link>
		<comments>http://www.overflow.biz/blog/lang/en-us/2008/05/30/an-old-css-trick#comments</comments>
		<pubDate>Fri, 30 May 2008 23:18:18 +0000</pubDate>
		<dc:creator>z3n</dc:creator>
				<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://overflow.biz/blog/?p=6</guid>
		<description><![CDATA[It&#8217;s been a long time i use this trick but i never got time to share it, so here it goes,
there are many different ways to have an specific css command to be interpreted by a IE or FF, but they are complicated some are obscure , other requires you to do a separated CSS [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time i use this trick but i never got time to share it, so here it goes,</p>
<p>there are many different ways to have an specific css command to be interpreted by a IE or FF, but they are complicated some are obscure , other requires you to do a separated CSS file etc etc</p>
<p>here&#8217;s my trick:<br />
<code><br />
.someclass {<br />
width:250px; /* this is for FF */<br />
//width:265px; /* this only works on IE */<br />
}<br />
</code><br />
so on FF it will ignore the commented line while IE will override the previous value with the one on the commented line; For some reason this works all IE versions i was able to test, somehow IE really loves to read the //&#8217;s , regular /* */ comments are ignored by both browsers.</p>
<p>that&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overflow.biz/blog/lang/en-us/2008/05/30/an-old-css-trick/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

