mysql -u root
CREATE DATABASE dbname;
GRANT ALL PRIVILEGES ON dbname.* TO "root"@"localhost";
FLUSH PRIVILEGES;
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 | |
<?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 | |
*/ |
<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> |
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 |
<?php | |
/** | |
* Plugin Name: Fix Twitter Oembed | |
*/ | |
class FixTwitterOembed { | |
private static $twitter_oembed_regex = '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i'; | |
public static function init() { | |
self::add_actions(); | |
} |
<?php | |
// php -S localhost:9393 router.php | |
$root = $_SERVER[ 'DOCUMENT_ROOT' ]; | |
chdir( $root ); | |
$path = '/' . ltrim( parse_url( $_SERVER['REQUEST_URI'] )['path'], '/' ); | |
set_include_path( get_include_path() . ':' . __DIR__ ); | |
if ( file_exists( $root . $path ) ) { | |
if ( is_dir( $root . $path ) && substr( $path, strlen( $path ) - 1, 1) !== '/' ) { |
mysql -u root
CREATE DATABASE dbname;
GRANT ALL PRIVILEGES ON dbname.* TO "root"@"localhost";
FLUSH PRIVILEGES;
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript">window.jQuery || document.write('<script src="http://cdn3.sbnation.com/javascripts/vendor/jquery-1.10.2.min.vda41706.js"><\/script>');</script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> | |
<script type="text/javascript">window._ || document.write('<script src="http://cdn1.sbnation.com/javascripts/vendor/underscore-1.5.2.min.vd22f881.js"><\/script>');</script> | |
</head> | |
<body> |
Dog goes woof, cat goes meow. | |
Bird goes tweet, and mouse goes squeak. | |
Cow goes moo. Frog goes croak, and the elephant goes toot. | |
Ducks say quack and fish go blub, and the seal goes OW OW OW. | |
But there's one sound that no one knows... | |
WHAT DOES THE FOX SAY? | |
Ring-ding-ding-ding-dingeringeding! | |
Gering-ding-ding-ding-dingeringeding! | |
Gering-ding-ding-ding-dingeringeding! |
["@brianabelson","@daniellealberti","@vijithassar","@danielbachhuber","@heychrisbarr","@hey_benjamin","@frankiebi","@mattboggie","@amyjo_brown","@sarahbures","@emmacarew","@ccrrccrccrr","@adebigare","@kyleellis","@tiffehr","@reubenfb","@jefffrankl","@JoeGermuska","@afgoldfarb","@CaseyG","@knowtheory","@harrisj","@kingkool68","@webjournalist","@kaeti","@aaronjorbin","@sandhya__k","@scottkellum","@kkrebeccalai","@pippinlee","@datatelling","@tylermachado","@jacqui","@ramoved","@ultracasual","@mclaughlin","@jeremybmerrill","@auremoser","@myersjustinc","@edmullen","@rdmurphy","@nacin","@oneillclaire","@fergle","@ryanpitts","@matthewpleasant","@thejefflarson","@kentonwpowell","@laurenrabaino","@ascheink","@dansinker","@thejqs","@laurieskelly","@ameensol","@andrewspittle","@haoyunsu","@mterenzio","@yurivictor","@derekwillis","@YAN0","@nicolelzhu","@tylrfishr","@aboutaaron","@millie","@aschweig","@thoughtbox","@zubakskees","@ektdary","@lenagroeger","@kev097","@veltman","@annabelchurch","@kiostark"] |