This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| function myFocus(element) { | |
| if (element.value == element.defaultValue) { | |
| element.value = ''; | |
| } | |
| } | |
| function myBlur(element) { | |
| if (element.value == '') { | |
| element.value = element.defaultValue; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form action="file.php" method="post" target="foo" onSubmit="window.open('', 'foo', 'width=450,height=300,status=yes,resizable=yes,scrollbars=yes')"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # FOR MAINTENANCE ONLY | |
| Options +FollowSymlinks | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteCond %{REQUEST_URI} !/maintenange.html$ | |
| RewriteCond %{REMOTE_HOST} !^000\.000\.000\.000 | |
| RewriteRule $ /maintenance.html [R=302,L] | |
| # REMOVE FOR MAINTENANCE ONLY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| php_value date.timezone Europe/Helsinki | |
| SetEnv TZ Europe/Helsinki |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Non-www to www | |
| RewriteCond %{HTTP_HOST} !^www\. | |
| RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L] | |
| www to non-www | |
| RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
| RewriteRule ^/(.*)$ http://%1/$1 [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Deny from all | |
| Order deny,allow | |
| AuthType Basic | |
| AuthName “Restricted” | |
| AuthUserFile /path_to_password/.htpasswd | |
| Require valid-user | |
| Allow from 192.168.1.10 | |
| Satisfy Any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # IF newdomain AND not subdir THEN redirect to subdir | |
| RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com | |
| RewriteCond %{REQUEST_URI} !^/domain | |
| Rewriterule ^(.*)$ /domain/$1 [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .imageReplace { | |
| border:0; | |
| font: 0/0 a; | |
| text-shadow:none; | |
| background-color:transparent; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SOURCE: http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/ | |
| +--------+------------+-------+ | |
| | type | variety | price | | |
| +--------+------------+-------+ | |
| | apple | gala | 2.79 | | |
| | apple | fuji | 0.24 | | |
| | apple | limbertwig | 2.87 | | |
| | orange | valencia | 3.59 | | |
| | orange | navel | 9.36 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync && rm test |