Custom Server Errors - IE Mystery Solved
06 Sept 2009
In Internet Explorer any server error that is shorter than 512 bytes will be replaced by IE with its own text.
Therefore even if you have gone to great lengths to build your own user friendly error pages, it will be necessary to make those customized
messages more than 512 characters long if you want them displayed by IE.
Workflow interuption by OS
03 Sept 2009
"Security issues have been identified that could allow an attacker to compromise a system that is running Microsoft Internet Explorer and gain control over it. You can help protect your system by installing this update from Microsoft. After you install this item, you may have to restart your computer."
This is a never ending cycle of interuptions to my workflow. Software packages increasingly call home for updates and when its 3 or 4 different apps at the same time wanting bandwidth and restarts I get annoyed.
What we need on Windows is a unified area on the OS to manage updates, from whatever vendor, in a controlled manner so that workflow is respected.
My first OOCSS
24 June 2009
/*CSS attempt Object Oriented CSS Framework concept by http://wiki.github.com/stubbornella/oocss/template*/
.aligned_input label{ margin-top:2px; width: 8em; float: left; text-align: right; margin-right: 0.5em; display: block; font-size:0.8em; }
.aligned_input input{ margin-top:2px; border:1px solid #666666; }
/* OOCSS grey */
.grey { color:#666666;}
/* OOCSS */
.panelbox { Border:1px solid #999999; padding:8px 0 0 0;}
/* OOCSS */
.width100 { width:100px }
.width400 { width:400px }
New line fails to work on PHP mail?
24 June 2009
'Your message /r/n' fails but using double quotes works "Your message /r/n"
Object Oriented CSS
16 June 2009
Nicole Sullivan outlines a new approach to writing CSS at Web Directions North 2009. She calls it Object Orientated CSS
and it makes sense.
How do I enable remote access to MySQL database server?
12 June 2009
Parallels Source Article here:http://kb.parallels.com/en/1134
login to Mysql:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql
For example, to allow access to database called 'data' for user 'allan' and remote IP 192.168.0.1 then type following commands at "mysql>" prompt:
mysql> GRANT ALL ON data.* TO allan@'192.168.0.1' IDENTIFIED BY 'PASSWORD';
mysql> REVOKE GRANT OPTION ON data.* FROM allan@'192.168.0.1';
Working with the variable name directly (PHP)
8 June 2009
Using the curly brackets gives you the power to build or work on a variable name directly
(ie the variable name not the contents of the variable)
Example php code:
$template_napkins='This is text all about napkins';
$cat='napkins';
// now build the variable name (note the use of the curly brackets) to point to a template
$t=${template_.$cat};
// $t now contains the CONTENT of the variable $template_napkins
echo $t;
//will output: This is text all about napkins
Slow editing pages over Lan
5 June 2009
At first I thought it was Java playing up in netbeans6.5 Previous versions weren't able to open files over a lan \\machinename\_htdocs\
unless the path was mapped as a network drive E:/_htdocs/
In the end the problem casing the slow down was temporarily solved by turning off my anti-virus
Xampp localhost server slow
28 May 2009
If localhost XAMPP server on windows XP is running very slow (3-5 seconds or more) to load a page try the following:
In C:\Windows\System32\drivers\etc\ edit the hosts file
change
127.0.0.1 localhost
to
# 127.0.0.1 localhost
(the # comments the line out)
.htaccess is king (apache linux hosting)
20 May 2009
Deny an IP
#Deny an IP
deny from 134.181.72.95
Redirect contents of an entire directory
Can be used as a temporary low bandwidth fix, or simple manual CDN Content delivery 'network'.
# 302 Temporary
# 301 Permanent
# temporary redirect contents of an entire directory to another domain
RewriteEngine on
RewriteCond %{HTTP_HOST} ^exampledomain.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.exampledomain.co.uk$
RewriteRule ^exampledir//?(.*)$ "http://www.anotherdomain.com/newdir/$1" [R=302,L]
Edit Places bar on left hand side, for Save As (Win XP)
5 May 2009
Instead of the default "My Computer" shortcut, you can change to your own shorcuts by editing the registry. Max of five shortcuts
HKEY_CURRENT_USER\
Software\Microsoft\Windows\CurrentVersion\Policies\comdlg3
"PlacesBar"
Place0 C:\backups
Place1 D:\folder
Place2 D:\folder2
Place3 E:\folder3
Place4 11 (note default is hexadecimal 11 for My Computer)