This file contains 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 | |
function guru_is_blog () { | |
global $post; | |
$posttype = get_post_type($post ); | |
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; | |
} | |
if (guru_is_blog()) { echo 'You are on a blog page'; } |
This file contains 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
// ImagePreloadingViewController - An iOS view controller for trying out different | |
// UIImage preloading strategies. Results for 1 MB png on iPhone 4S: | |
// - No preload: drawing the image right away (80 ms) | |
// - Header preload: getting the width (10 ms) and then drawing (100 ms) | |
// - Data preload: getting the data (110 ms) and then drawing (75 ms) | |
// - Draw preload: drawing it once (100 ms) and then again (20 ms) | |
// In short: preload a UIImage by drawing it. | |
// License: BSD | |
// Author: Leonard van Driel, 2012 |
This file contains 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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |