#Techniques for Anti-Aliasing @font-face on Windows
It all started with an email from a client: Do these fonts look funky to you? The title is prickly.
The font in question was Port Lligat Sans from Google Web Fonts.
#Techniques for Anti-Aliasing @font-face on Windows
It all started with an email from a client: Do these fonts look funky to you? The title is prickly.
The font in question was Port Lligat Sans from Google Web Fonts.
#Mobile Device Detection via User Agent RegEx
Yes, it is nearly 2012 and this exercise has been done to death in every imaginable language. For my own purposes I needed to get the majority of non-desktop devices on to a trimmed down, mobile optimized version of a site. I decided to try and chase down an up-to-date RegEx of the simplest thing that could possibly work.
I arrived at my current solution after analyzing 12 months of traffic over 30+ US based entertainment properties (5.8M+ visitors) from Jan - Dec 2011.
The numbers solidified my thoughts on the irrelevancy of including browsers/OSes such as Nokia, Samsung, Maemo, Symbian, Ipaq, Avant, Zino, Bolt, Iris, etc. The brass tacks of the matter is that you certainly could support these obscure beasts, but are you really going to test your site on them? Heck, could you even find one?! Unless the folks that pay you are die hard Treo users my guess is "No".
Interestingly enough my research shows that /Mobile/ is more efficient than **/iP(
/** | |
* Add a custom shortcode to popup youtube videos in a thickbox overlay. | |
* Pastable to functions.php in a WordPress theme. | |
* | |
* Usage (in WP Editor): | |
* [ytp url="http://www.youtube.com/watch?v=xxxxxxxxxxxxx"] | |
* | |
* From: http://manchumahara.com/2010/03/22/using-wordpress-native-thickbox/ | |
*/ |
<?php | |
/* | |
A quick set of functions to move items in a non-associative array | |
up or down by one, shifting the items around it appropriately. | |
Original usage was to for a set of UP and DOWN buttons to | |
manipulate the order of an array of items stored in Wordpress option. | |
*/ | |
$a = array('a','b','c','d','e'); |
/* | |
An example of using MySQL's ENCRYPT() and DECRYPT() functions to store | |
sensitive data in a Wordpress Option. In this case, a password. | |
This only provides a bare amount of security as your Key is likely stored somewhere | |
else in your code or database. Basically, its not plaintext. | |
http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html | |
*/ |
#/!/bin/bash | |
# Most of the tweaks here are wrapped up in gmailmig | |
# https://code.google.com/p/gmailmig/ | |
# | |
# Props to brave folks who figured this out before me | |
# http://imapsync.lamiral.info/FAQ | |
# http://www.thamtech.com/blog/2008/03/29/gmail-to-google-apps-email-migration | |
# http://seagrief.co.uk/2010/12/moving-to-google-apps-with-imapsync/ | |
# http://blog.mcfang.com/tag/imapsync/ | |
# |
/* | |
For use in functions.php in combination with: | |
http://wordpress.org/extend/plugins/google-analytics-for-wordpress/ | |
*/ | |
add_filter('wp_nav_menu', 'menu_ga_tracking', 99); | |
function menu_ga_tracking($menu) { | |
if( class_exists('GA_Filter') and yoast_ga_do_tracking() ) { | |
$menu = preg_replace_callback( |
<!-- | |
This is the standard Javascript embed code for a WuFoo form with an | |
added var (iamnotscrolling) that delays a scroll to the top of the form | |
on submit or error. | |
We are hijacking the resizeDone function which fires after the form is | |
modified (this may have unintended consequences). | |
--> |
#!/bin/bash | |
WPUSER="username" | |
WPDBNAME="wp_db" | |
if [ $# -ne 1 ] | |
then | |
echo "Enter a WPMU ID for the Database" | |
exit | |
fi | |
DBS=$(mysql -u $WPUSER -p -ss $WPDBNAME -e "SHOW TABLES LIKE 'wp_$1_%'" | tr "\n" " ") | |
$(mysqldump -u $WPUSER -p $WPDBNAME $DBS > wp_$1_sql) |
#!/bin/bash | |
# http://www.ivorde.ro/How_to_backup_all_mysql_databases_with_one_command-51.html | |
# http://bash.cyberciti.biz/backup/backup-mysql-database-server-2/ | |
# http://sgowtham.net/blog/2008/04/04/backing-up-and-restoring-mysql-databases/ | |
# Requires: http://s3tools.org/s3cmd | |
MyUSER="YOUR-USERNAME" | |
MyPASS="YOUR-PASSWORD" | |
MyHOST="localhost" |