October 2009
4 posts
2 tags
Target #CSS to browser [ #IE fixes ]
How to target a single CSS instruction to IE and also to a single version of IE.
element {
/* All Browsers */
property: value;
/* IE 7 and below */
*property: value;
/* IE 6 and below */
_property: value;
/* IE 6 only */
_pr\operty: value;
}
3 tags
Regex to change any BR in space in #PHP
This is a simple example showing how to change any <br> contained in an HTML string into a space, avoiding double spaces.
<?php
$string = 'Lorem <br>ipsum<br style="border:1px solid #CCC" />dolor<br /> sit<br style="height:1000px;">amet';
/* Stripping all other tags
* [optional, depends on what you want to do
*/
$string = strip_tags($string,'<br>');
/*...
2 tags
#Apache Error : No space left on device
Here’s how I get rid of annoying error ‘no space left on device’ while restarting apache webserver on Debian Lenny
fuser -k -n tcp 80
2 tags
Show tables in #Postgres ( #SQL )
This is a quick replacement for the ‘show tables’ #mysql command when using #postgres. If you’re on a psql shell you can just do ‘\d’ the following scripts refers to the case you need to show tables from an external script.
select tablename from pg_tables where tableowner='yourname';