mysql -u root
CREATE DATABASE dbname;
GRANT ALL PRIVILEGES ON dbname.* TO "root"@"localhost";
FLUSH PRIVILEGES;
var cheerio = require('cheerio'); | |
var request = require('request'); | |
var fs = require('fs'); | |
var s, | |
Scrape = { | |
settings: { | |
// Object, the json to be output | |
json: {}, | |
// String, the url to scrape |
from datetime import * | |
from dateutil.rrule import * | |
from dateutil.relativedelta import * | |
PRETTY_YEARS = [] | |
def get_pretty_february(): | |
# look back 100 years | |
YEARS_AGO = 100 | |
TODAY = date.today() |
[ | |
{ | |
"url": "http:\/\/www.niemanlab.org\/2014\/12\/content-creators-are-users-too\/", | |
"story": "We\u2019ve seen a lot of innovation over the past few years in how content is presented: Circa leveraging mobile to deliver evolving topics, Vox card stacks bringing context to news, and sites continuing to raise the bar for visual storytelling. It\u2019s an exciting time, and there\u2019s plenty more to come as companies continue to bring journalism and technology together. But while consumers are reaping the benefits of this content revolution, it seems like we\u2019ve left creators in the dust. That gorgeous longform template with infographics and parallax effects or that streamlined feed of latest news is a great experience for the user, but they can be a nightmare for those building them. Editors are often left to their own devices, forced to navigate clunky CMSes and connect the dots between form fields and what users will see. That\u2019s all starting to change. Medium was the first product to revol |
var letters = ['a', 'b', 'c']; | |
var length = letters.length; | |
var i = 0; | |
/* This is loop invariant. IDK. */ | |
while ( i < length ) { | |
console.log( letters[i] ); | |
i++; | |
} |
["@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"] |
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! |
<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> |
mysql -u root
CREATE DATABASE dbname;
GRANT ALL PRIVILEGES ON dbname.* TO "root"@"localhost";
FLUSH PRIVILEGES;
<?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) !== '/' ) { |
<?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(); | |
} |