Skip to content

Instantly share code, notes, and snippets.

View okor's full-sized avatar
🏎️

Jason Ormand okor

🏎️
  • Vox Media
  • Denver, CO
View GitHub Profile
@okor
okor / is_blog.php
Created August 31, 2012 16:23 — forked from wesbos/is_blog.php
WordPress is_blog()
function 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 ;
}
Usage:
<?php if (is_blog()) { echo 'You are on a blog page'; } ?>
@okor
okor / gist:2790431
Created May 25, 2012 20:36 — forked from mattmanning/gist:1430691
Fixing Apachebench on OS X Lion
brew install pcre
wget http://apache.mirrors.pair.com/httpd/httpd-2.4.2.tar.bz2
tar xzvf httpd-2.4.2.tar.gz
cd httpd-2.4.2
./configure
make
make install
sudo cp /usr/local/apache2/bin/ab /usr/sbin/ab
@okor
okor / install.sh
Created May 14, 2012 18:51 — forked from cloud8421/install.sh
Install tmux 1.6 on Ubuntu 10.04
wget -q -O - https://raw.github.com/gist/2204072/install_tmux_1.6_on_ubuntu_10.04.sh | sudo bash