- Use Eric Meyer's CSS override
- Use clearfloat instead of
clear:both
, when applicable - Use core html over divs whenever possible (
h2
,p
,li
,ol
,time
) - Add a top level ID to every kind of page (
#race-page
,#candidate-page
) - Use IDs for elements that are unique to every page in the site
- Use hyphens for IDs and classes, no camelCase or underscores. (Improves readability)
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
/** | |
* Enqueue the necessary CSS and JS that liveblog needs to function. | |
* | |
* @return If not a liveblog post | |
*/ | |
public static function enqueue() { | |
// Only add files files if post is a liveblog | |
global $post; | |
if ( ! is_singular() && false === strpos( $post->post_content, '[liveblog]' ) ) |
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
(flag:ad)(flag:ae)(flag:af)(flag:ag) | |
(flag:ai)(flag:al)(flag:am)(flag:an)(flag:ao) | |
(flag:aq)(flag:ar)(flag:as)(flag:at)(flag:au) | |
(flag:aw)(flag:az)(flag:ba)(flag:bb)(flag:bd) | |
(flag:be)(flag:bf)(flag:bg)(flag:bh)(flag:bi) | |
(flag:bj)(flag:bm)(flag:bn)(flag:bo)(flag:br) | |
(flag:bs)(flag:bt)(flag:bv)(flag:bw)(flag:by) | |
(flag:bz)(flag:ca)(flag:cc)(flag:cd)(flag:cf) | |
(flag:cg)(flag:ch)(flag:ci)(flag:ck)(flag:cl) | |
(flag:cu)(flag:cv)(flag:cx)(flag:cy)(flag:cz) |
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
import json | |
import requests | |
from pyquery import PyQuery as pq | |
def get_transcripts(): | |
url = 'http://www.westwingtranscripts.com/search.php?flag=getTranscript&id=' | |
for x in range( 1, 156 ): |
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 | |
/** | |
* Load a template. MVC FTW! | |
* | |
* @param string $template the template to load, without extension (assumes .php). File should be in templates/ folder | |
* @param args array of args to be run through extract and passed to template | |
*/ | |
function template( $template, $args = array() ) { | |
extract( $args ); |
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
# Requires: xcode, xcode command line tools | |
# Need to do: | |
# nginx.conf | |
# php-fpm plist | |
# Install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
# Install requirements |
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 | |
/** | |
* Loads and substantiates all classes in the classes folders | |
* Classes should be named in the form of Washington_Post_{Class_Name} | |
* Files should be the name of the class name e.g. class-name.php | |
* Classes will be autoloaded as $object->{class_name} | |
*/ | |
function _load_subclasses() { | |
// load all core classes |
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 | |
/** | |
* Generate meta keywords from post tags | |
* | |
* @uses wp_get_post_tags | |
* @return string keywords | |
* | |
* Usage: | |
* <meta name="keywords" content="<?php echo get_meta_keywords(); ?>"> |
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 | |
/** | |
* Creates nicer default avatars | |
* by using first initial on flat color | |
* | |
* How to: echo create_avatar( 'yurivictor', 48 ); | |
* Example: http://yurivictor.com/avatars | |
* | |
* @var string $user, the name of the user to create the avatar | |
* @var int $size, the size in px of the avatar |