- 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
(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
/** | |
* 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
import requests | |
def get_photos(): | |
RANGE_TOP = 1 | |
RANGE_BOTTOM = 500000000 | |
# Iterates through the list of images | |
for i in range(RANGE_TOP, RANGE_BOTTOM): |
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
(function ($) { | |
// SETS UP RIGHT/LEFT ARROW PAGINGATION | |
// Key 39 is the right arrow | |
// Key 37 is the left arrow | |
$('body').keyup(function (event) | |
{ | |
if (event.keyCode == 39) | |
{ | |
window.open('next-page-url','_self'); | |
} |
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
<style> | |
.tab-menu { border-bottom: 1px solid #eee; padding: 0; } | |
.tab-menu:before, | |
.tab-menu:after { content: "\0020"; display: block; height: 0; overflow: hidden; } | |
.tab-menu:after { clear: both; } | |
.tab-menu li { float: left; list-style: none; } | |
.tab-menu li a { background: #fff; border: 1px solid #eee; border-bottom: 0; display: block; padding: 10px; } | |
.tab-menu .selected { margin-bottom: -1px; padding-bottom: 11px; } | |
.tab-item { clear: left; display: none; } | |
.tab-item-selected { display: block; } |
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 iOSDetect() { | |
$browser = strtolower( $_SERVER['HTTP_USER_AGENT'] ); | |
if( strstr( $browser, 'iphone' ) || strstr( $browser, 'ipod' ) ) | |
$device = 'iphone'; | |
return( $device ); | |
} | |
iOSDetect(); |
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 | |
def get_twitter_favorites(): | |
# SET UP VARIABLES | |
SCREEN_NAME = 'yurivictor' # Please change this | |
BASE_URL = "https://api.twitter.com/1/favorites.json?screen_name=" | |
URL = BASE_URL + SCREEN_NAME | |
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
from datetime import * | |
from dateutil.rrule import * | |
from dateutil.relativedelta import * | |
def get_friday_the_13s(): | |
YEARS_AGO = 100 | |
TODAY = date.today() | |
YEARSAGO = TODAY + relativedelta(years=-YEARS_AGO) | |
fridays = list(rrule(DAILY, byweekday=(FR), dtstart=YEARSAGO, until=TODAY)) | |
friday13s = list(rrule(DAILY, bymonthday=13, byweekday=(FR), dtstart=YEARSAGO, until=TODAY)) |