CSS opacity

Part of CSS3 - good for transparency on solid colour:

div.transparent {
    filter:alpha(opacity=25);
    -moz-opacity:.25;
    opacity:.25;

    background: #000;
}
  1. This is the one for IE6
  2. Legacy Firefox
  3. Everyone else

Note: everything in the element is opacified, if you just want it on the background you'll need to float the foreground stuff on top.

Posted 13 Nov 2008, tagged with css firefox ie6

User management

  1. /usr/sbin/useradd -m -s /bin/bash user
    
  2. /usr/bin/passwd user
    
  3. /usr/sbin/visudo
    
    or
    /usr/sbin/usermod -a -G wheel user
    

sudo if you don't have su.

Posted 06 Nov 2008, tagged with linux shell sysadmin redhat ubuntu

phpMyAdmin import from mysqldump

PMA (2.7 at least) cannot interpret /* */ comments. I hate it so much.

If you only have access to mysqldump at the export end and PMA at import, use --compact to strip the extra gear.

Posted 28 Oct 2008, tagged with mysql shell

Javascript form submit

You can use Javascript to form.submit() on any visible element in DOM, but just remember to return false; after. If you're clever enough to have used an anchor, it will form submit and then follow the link - but not always in the same order. About 1 in 10 will follow the link first, then submit.

Advice: return false(), don't fill in the href, or just don't form.submit() on anchors.

Posted 27 Oct 2008, tagged with javascript html php

AppleScript comments

AppleScript comments look like this

(*

 whacky shack

*)

Posted 21 Oct 2008, tagged with mac