Here are some notes when hacking on jquery, compiled over time.
- If your browser scrolls to the top of the screen when the dialog opens and you're opening it from an onclick event on an Anchor tag, make sure you return false in the click event.
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ path/to/pagehandler.php?page=$1 [QSA] | |
</IfModule> |
Notes from upgrade: | |
Prep: | |
1) Make sure up to date, aptitude update && aptitude upgrade | |
2) Reboot | |
Upgrade: | |
1) Change sources (etch->lenny) | |
2) aptitude safe-upgrade & resolve issues |
Prep: | |
- apt-get update && apt-get upgrade && apt-get dist-upgrade | |
- Check for holds | |
dpkg --audit | |
dpkg --get-selections | grep hold | |
aptitude & press "g" | |
- Edit sources.list s/lenny/squeeze | |
- apt-get update NOTE: Debian docs say don't use aptitude to upgrade. | |
- apt-get upgrade to to a safe-upgrade |
DATE -> SECONDS | |
--------------- | |
(CELL - DATE (1970,1,1))*86400 | |
TIME -> SECONDS | |
--------------- |
/* | |
* To correctly set the doc name of a java App in OSX, use.... | |
*/ | |
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Foo"); | |
// Quick regexp to remove non-alpha chars from a string. Very handy | |
$string = preg_replace("/[^a-zA-Z0-9\s]/", "", $string); |
// Quick regexp to remove non-alpha chars from a string. Very handy | |
$string = preg_replace("/[^a-zA-Z0-9\s]/", "", $string); |
sed -r "s/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" |
Some example paypal response for reference: | |
array ( | |
'test_ipn' => '1', | |
'payment_type' => 'instant', | |
'payment_date' => '03:46:59 Jul 19, 2012 PDT', | |
'payment_status' => 'Completed', | |
'address_status' => 'confirmed', | |
'payer_status' => 'unverified', | |
'first_name' => 'John', |