~ overflow ~

Tag: Hack

Blue Soleil 6.4.249

by z3n on Apr.16, 2010, under Tips & Hints

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’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.

Solution:

On windows 7, the version they provided me, 1.6 simply don’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’t upgrade for free, and the trial only gives me 2mb of data transferred. Windows 7 native bluetooth support is a joke, so i’m not commenting it.

After searching a lot i’ve found several versions of the 6.4.xxx none of they worked, no torrents worked and the cracks were useless.

Until i found 6.4.249 on a hidden comment somewhere.

Here’s the link to download the working version (32/64 bit, Windows 7 tested).

Oh so cool, now i can use my headphones again!

1 Comment :, , , , , more...

Overriding MySql Max Connections

by z3n on Apr.06, 2010, under Tips & Hints

Problem:
MySQL has reached max connections and you can’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 "set max_connections=5000" -batch

What’s the difference?

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’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.

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’s going on, even run some scripts to clean up idle/stuck connections, making things easier.

Leave a Comment :, , , , more...

Custom Google Search “API” by PHP (No API Needed)

by z3n on Jun.16, 2009, under Coding, Tips & Hints

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’s been deprected and they only have the useless AJAX option, which don’t really serve my propouse since the searches would be client-side processed at AJAX, and i needed them server-side processed.

Solution:

This might looks like a hack, but there’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.

So here’s the PHP source that don’t depend on google happyness to work:

// (c) z3n – R1V1@090616 – z3n666@gmail.com – www.overflow.biz
  1.  
  2. if (!isset($argv[1])) { echo "Usage: ".$_SERVER['PHP_SELF']."  [start]";die; } else { $s=$argv[1]; }
  3.  
  4. $e=(isset($argv[2])) ? "&start=".$argv[2] : "";
  5.  
  6. $x=file_get_contents("http://www.google.com/search?q=".$s."&num=100".$e);
  7.  
  8. // apply DOM
  9.  
  10. $dom=new DOMDocument();
  11. @$dom->loadHTML($x);
  12.  
  13. $xpath=new DOMXPath($dom);
  14. $a=$xpath->evaluate("/html/body//a");
  15. for ($i=$k=0;$i<$a->length;$i++) {
  16.  $y=$a->item($i);
  17.  $z=$y->getAttribute('href');
  18.  // filter out google crap, wikipedia and youtube
  19.  if (($z{0} != "/") && (strpos($z,"q=cache:") === false) && (strpos($z,"youtube.com/") === false) && (strpos($z,"wikipedia.org/") === false) && (strpos($z,".google.com/") === false)) {
  20.   $_url[$k]=$z;$k++;
  21.  }
  22. }
  23.  
  24. print_r($_url);
  25. echo "Found: ".$k." urls.";

* 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.


Leave a Comment :, , , , , , , , more...

An old CSS Trick

by z3n on May.30, 2008, under Tips & Hints

It’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 file etc etc

here’s my trick:

.someclass {
width:250px; /* this is for FF */
//width:265px; /* this only works on IE */
}

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 //’s , regular /* */ comments are ignored by both browsers.

that’s all.

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!