Friday, April 27, 2012

How to deny access to .ini files with htaccess?

<Files *.ini>
deny from all
</Files>

or

<Files my.ini>
order deny,allow
deny from all
</Files>

Useful color scheme designer for w3b d3sign3rs


Color Scheme Designer (CSD) is a web application designed to easily create set of matching color. Color theory used by artists for centuries was transformed into algorithms to combine color they go best together while avoiding uncomfortable combinations.

Color scheme designer : http://colorschemedesigner.com/
Color scheme designer blog : http://www.colorschemedesigner.com/blog/

How to change the html 'title' attribute look?


Css:

/* vtip */
p#vtip { display: none; position: absolute; padding: 15px; left: 5px; font-size: 13px; background-color: #F6F6F6; border: 1px solid #E1E1E1; z-index: 9999; color: #DD471D; }
p#vtip #vtipArrow { position: absolute; top: -10px; left: 5px }


Jquery:

$(document).ready(function(){
    vtip();
});

var vtip = function () {
    var xOffset = -10;
    var yOffset = 10;
    $(".vtip").unbind().hover(function (a) {
        this.t = this.title;
        this.title = "";
        this.top = (a.pageY + yOffset);
        this.left = (a.pageX + xOffset);
        $("body").append('<p id="vtip" style="font-size: 13px;">' + this.t + "</p>");
        $("#vtip").css("top", this.top + "px").css("left", this.left + "px").fadeIn(400);
    }, function () {
        this.title = this.t;
        $("#vtip").fadeOut(400).remove();
    }).mousemove(function (a) {
        this.top = (a.pageY + yOffset);
        this.left = (a.pageX + xOffset);
        $("#vtip").css("top", this.top + "px").css("left", this.left + "px");
    })
}

How to use? Html example:

...
<area shape="rect" class="vtip" coords="12,19,11,19" href="#"  title="Hotel" />
...

or

<a class="vtip" href="#">read more ></a>

Tuesday, April 24, 2012

Solving Firefox bug with SOCKS5 proxy

Type in firefox:

about:config

Then you need to set socks5 flag to "true":

network.proxy.socks_remote_dns = true

Sunday, April 15, 2012

Wamp - php_exif.dll reported as not found


While making some alterations to my php.ini file yesterday I came across an old bug that has gotten me before where PHP throws an error regarding the EXIF PHP extension used by photo gallery applications and the like. In a nutshell the error says that php_exif.dll cannot be found despite it being in the extensions directory with the same NTFS permissions as every other PHP extension.

Solution for this little annoyance is actually quite simple, yet I've not been able to find an solid explanation for why it happens. The problem is caused by some sort of clash between the php_mbstring.dll extension (used for Multibyte character encoding) and the php_exif.dll extension which only occurs when PHP tries to load EXIF before Mbstring.

The problem here is that by default the PHP extensions in your php.ini file are listed in alphabetical order by default, which means if you just uncomment you EXIF and Mbstring extensions as they are like most of us then you are always going to have this problem. To avoid this problem all you have to do is cut and paste php_mbstring.dll so it is listed above php_exif.dll in you php.ini file. Do this are PHP will now be able to load both your EXIF and Mbstring extensions without an issue.