Archive for November, 2010

Linux: Bash Shell script, variable, if/else, echo

Monday, November 29th, 2010

Great tutorial: Bash Scripting Tutorial

Test if a parameter is defined

test.sh

#!/bin/bash
if [ -n "${1}" ]; then
  echo $1
else
  echo "hum, nothing"
fi

test.sh will output “hum, nothing”

test.sh foo will output “foo”

Google: GMail Filters (for attachment, size, OR, AND)

Thursday, November 25th, 2010
  • Attachments before a date: filename:(zip OR rar OR mov OR avi OR ppt OR doc OR xls OR ai OR mp3 OR pdf OR psd OR jpg OR png) before:2010/01/01
GMail Help

CSS: Box Shadow on Chrome, Firefox, WebKit, IE7, IE8

Thursday, November 11th, 2010
.shadow {
	-moz-box-shadow: 3px 3px 4px #000;
	-webkit-box-shadow: 3px 3px 4px #000;
	box-shadow: 3px 3px 4px #000;
	/* For IE 8 */
	-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000')";
	/* For IE 5.5 - 7 */
	filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000');
}

Source: http://robertnyman.com/2010/03/16/drop-shadow-with-css-for-all-web-browsers/

CSS: item / row selectors nth-child(odd) and first-child

Wednesday, November 10th, 2010

Highlight first item

tr:first-child{
	background: #ddddff;
}

Highlight odd items

tr:nth-child(odd){
	background: #e0e0e0;
}
Note: Works on any html element