#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.
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-22762790-1']); | |
// DELAY _gaq.push(['_trackPageview']); | |
(function () { | |
var ga = document.createElement('script'); | |
ga.type = 'text/javascript'; | |
ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; |
<!-- | |
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). | |
--> |
/** | |
Get all terms in a Taxonomy including associated posts | |
Like get_objects_in_term() for all terms or get_terms() that includes posts | |
@$tax string Taxonomy to fetch (Default "post_tag", must be a slug) | |
@$post_type string Post type to use (Default "post") | |
@$query_args string Additional Query Args to use when querying objects (Default: '', must be string form, eg 'order=ASC&post_status=published') | |
@$return_ids bool Return just Post IDs in $return->posts instead of complete post Objects (Default: false) | |
*/ | |
function get_objects_in_taxonomy($tax = 'post_tag', $post_type = 'post', $query_args = '', $return_ids = false ) { |
<!-- http://tinkerbin.com/jkItQEwh --> | |
<a href="https://www.facebook.com/events/331218348435" class="fb_rsvp" target="_blank" title="RSVP on Facebook">RSVP</a> | |
<style type="text/css"> | |
a.fb_rsvp { | |
background: #ECEEF5 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAASCAYAAADLw4ffAAAAAXNSR0IArs4c6QAAA0ZJREFUSA3VVXtIk1EU/21q6h665ZypU9SgtEwt0hL6JyICiQgRiwgKCiPor/qjiKiECCIEA+lB2UOMgiyo6GVkLxMniuarfGe6pXNu6l5uPta9V78vc5u5CMwL+75zzj3n3N8953e+CfQGixOLdAkXKW4Ge1GD952r8rVftGhq00FnMOPo/k1zuS7InkfwLV16FNyt5EFRfWWsgtf/B0HgaWAPnHrkgq/wXKaLbaZhYmISjW39vEkq9kdMpBxCoYC3aXUj6NObEB+nhCjAj9m7tUMIkvhDHhTI+/X2DSOQ7FN7c7tuyk7SRIfLeL9/ynm7YxzXS6rR1j3IfmXqTpzML4XJYmeHXyqqwOuKdgLejPw7n1D5uYfZO74P4sWHVh44FW6QPDb7GKy2MRQ+nMrZSrp/5Z4axU/rmK9H2vyWyQtFIlqCrG2JfETxkzpUN2qwIkYBx9g49u1cx/bSU6Lx4GUDNiZHIXWNCrmXy7A7I4l1STdoxuSkE6qwYAybRkE7yOUcJ909kfcKmVtX468qTynljlY84mnBbHXgB6FIhFIKWVAANDoTq/CAwcJan5OdxjwpuKhlwfjaNcD0miYt0pJUs9MxnVKOLn8/H3isPOU3B1AmDUDe8QwW9KeHYdiKMwVvmJtx2Ia4KDmrukAgwOnDm0GpdPW+GqOEYrSaaxMimG96cjTU9T1YtVyJmiYNcrJT |
/** | |
* 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/ | |
*/ |
#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.
<!-- | |
For testing how multiple versions of jQuery interact on a page, | |
see http://jsfiddle.net/dalesaurus/5TgkG/ | |
--> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript">window.jQuery || document.write('<script src="/js/jquery-1.7.1.min.js"><\/script>')</script></script> | |
<script type="text/javascript"> | |
var jQuery171 = window.jQuery; | |
jQuery171(document).ready(function($){ | |
// Do work, son! |
#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(
<?php | |
/* | |
Plugin Name: Generic Menu | |
Plugin URI: http://example.com/ | |
Description: Move things | |
Author: dalethedeveloper | |
Version: 0.1 | |
*/ | |
new myadmin_generic(); |
<?php | |
/** | |
Echo a list of tags terms for posts that are also have a $where_tax of $where_slug | |
Queries added to transient cache for performance | |
Note: Using the slug for a Taxonomy in $where_slug for simpler query | |
Tested up to WP 3.3, drop it in your functions.php | |
Example: Get a tag list for Posts in the 'News' Category | |
tags_by_other_taxonomy('news'); |