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 | |
$uri = str_replace( '%20', ' ', $_SERVER['REQUEST_URI'] ); | |
highlight_file( $_SERVER['DOCUMENT_ROOT'] . preg_replace( '/\.phps$/', '.php', $uri ) ); |
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 | |
/** | |
* Hook actions in that run on every page-load | |
* | |
* @uses add_action() | |
*/ | |
private function add_actions() { | |
add_action( 'wp_enqueue_scripts', 'enqueue_scripts' ); | |
} |
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
/** | |
* Theme Name: WaPo Blogs | |
* Theme URI: http://www.washingtonpost.com | |
* Author: The Washington Post | |
* Description: WaPo Blog Theme | |
* Version: 0.1 | |
* License: GNU General Public License | |
* License URI: license.txt | |
**/ |
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
# Search WordPress | |
# usage wpgrep 'function the_content' | |
jsgrep() { # search development scripts | |
find . \( -name "*.dev.js" -print \) | xargs grep -n "$1" | |
} | |
cssgrep() { # search development css files | |
find . \( -name "*.dev.css" -print \) | xargs grep -n "$1" | |
} | |
phpgrep() { # search php files | |
find . \( -name "*.php" -print \) | xargs grep -n "$1" |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme", | |
"draw_indent_guides": true, | |
"draw_white_space": "selection", | |
"file_exclude_patterns": | |
[ | |
".DS_Store", |
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> | |
.hexagon { | |
height: 150px; | |
overflow: hidden; | |
transform: rotate(120deg); | |
width: 300px; | |
-webkit-transform: rotate(120deg); | |
-moz-transform: rotate(120deg); | |
-o-transform: rotate(120deg); |
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
# Result: https://gist.github.com/yurivictor/6500840 | |
import requests | |
from pyquery import PyQuery as pq | |
URL = 'http://www.niemanlab.org/riptide/' | |
def get_names(): | |
request = requests.get( URL ) | |
html = request.content | |
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 2 columns, instead of 3 in line 9.
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
Ken Richieri, | |
Chloe Sladden, | |
Nicholas Negroponte, | |
Chris Schroeder, | |
Julius Genachowski, | |
Marty Baron, | |
Om Malik, | |
Michael Sippey, | |
John Harris, | |
Arthur Sulzberger, Jr., |
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 | |
/** | |
* Get video information and convert to array | |
* @param string $url, the url of the video | |
* @uses wp_remote_get() | |
* @return array $video, information about the video | |
*/ | |
function get_video( $url ) { | |
$video = array(); |
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 AreYouANumber( n ) { | |
return n === n + 0; | |
} |