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 | |
API = 'https://api.forecast.io/forecast/' | |
KEY = 'c67cec34041e316f293bec1e1f5081dd' | |
def get_current_conditions( latitude, longitude ): | |
url = API + KEY + '/' + latitude + ',' + longitude | |
request = requests.get( url ) | |
data = request.content |
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
<a data-social-name="twitter" href="javascript:void( 0 )" onclick="window.open( 'http://www.twitter.com/intent/tweet?text=<?php echo htmlspecialchars( urlencode( html_entity_decode( get_the_title(), ENT_COMPAT, 'UTF-8' ) ), ENT_COMPAT, 'UTF-8' ); ?>&url=<?php echo get_permalink() ?>','','width=550, height=350, scrollbars=no' )">Twitter</a> |
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 | |
/* | |
Plugin Name: Color Rotator | |
Description: Change the color scheme every time you login | |
Author: Aaron Jorbin | |
Version: 1.0 | |
Author URI: http://aaron.jorb.in/ | |
License: GPLv2 or later | |
*/ |
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 | |
from pyquery import PyQuery as pq | |
USERNAME = 'ev' # change to your username | |
def get_medium_posts(): | |
url = 'http://medium.com/@' + USERNAME + '/latest' | |
request = requests.get( url ) | |
html = request.content | |
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; | |
} |
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(); |
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
# 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 | |
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
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", |