Dark Launch

This is a Dark Launch.

Use 7zip as default zip file manager; Set 7zip as default; Open With 7zip

1. Download and install 7-zip (free) from http://www.7-zip.org/download.html
2. Open My Computer/Windows Explorer. Select Tools> Folder Options.
3. Select the File Types tab and click the New button.
4. Type zip into the file extension text field and click OK.
5. Select the ZIP extension if not already selected and click change.
6. Click Select the program from a list and click OK.
7. Browse to C:\Program Files\7-Zip\7zFM.exe and click Open.
8. Click OK and zip files will now be opened with 7-zip.
Also, FileTypesMan from NirSoft is an excellent file types manager:
http://www.nirsoft.net/utils/file_types_manager.html

Javascript Trim; PHP like Trim for Javascript

Similar to PHP's trim().
Javascript
 
/* String Trim
*
* str.trim();
* str.ltrim();
* str.rtrim();
*
* trim(str);
* ltrim(str);
* rtrim(str);
*
*/

String.prototype.trim=function(){
return this.replace(/^\s+|\s+$/g,'');
};
String.prototype.ltrim=function(){
return this.replace(/^\s+/,'');
};
String.prototype.rtrim=function(){
return this.replace(/\s+$/,'');
};
function trim(str,chars){
return ltrim(rtrim(str,chars),chars);
}
function ltrim(str,chars){
chars=chars||'\\s';
return str.replace(new RegExp("^["+chars+"]+","g"),"");
}
function rtrim(str,chars){
chars=chars||'\\s';
return str.replace(new RegExp("["+chars+"]+$","g"),"");
}

Multiple SciTE Windows; Open at the same time

Open SciTE. Select Options> Open Files Here.
If "Open Files Here" is grayed out or disabled:
Open "\Program Files\SciTE\SciTEGlobal.properties".
Search for "check.if.already.open" and set it to 1.
Code
 
check.if.already.open=1
 

keyconfig with Firefox 3.0.7; install.rdf

Open:
C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\\extensions\keyconfig@dorando\install.rdf
Update :
Code
 
<targetApplication><rdf:Description>
<id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
<minVersion>2.0.0.17</minVersion>
<maxVersion>3.2</maxVersion>
</rdf:Description></targetApplication>
 

maxVersion needs to be greater than 3.0.7

MySql Format Money/Currency with Dollar Sign; Get Total for Month

Format the mysql select with a dollar sign and two decimal places.
UPDATE:
SQL
 
-- FIXED: last day in month was not being counted
SELECT
CONCAT('$',FORMAT(SUM(`invoice_total`),2)) AS month_total
FROM
`invoices`
WHERE
`invoices`.`timestamp`>DATE_SUB('2009-02-01',INTERVAL 1 DAY) AND
`invoices`.`timestamp`<DATE_ADD(LAST_DAY('2009-02-01'),INTERVAL 1 DAY)
LIMIT
1

WRONG:
SQL
 
SELECT
CONCAT('$',FORMAT(SUM(`invoice_total`),2)) AS month_total
FROM
`invoices`
WHERE
`timestamp`>='2009-02-01' AND
`timestamp`<=LAST_DAY('2009-02-01')
LIMIT
1