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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="https://rawgithub.com/caolan/async/master/lib/async.js"></script> | |
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script> | |
<script> | |
window.URL = window.URL || window.webkitURL; | |
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
<!doctype html> | |
<html lang=en> | |
<head> | |
<meta charset=utf-8> | |
<title>JSONP Test</title> | |
<script> | |
function foo(data) { | |
document.getElementsByTagName('body')[0].innerHTML=JSON.stringify(data); | |
} |
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
#!perl | |
use v5.12; | |
use warnings; | |
use Subtitles::ASS::File; | |
use Subtitles::SRT::File; | |
use Subtitles::Time; | |
use List::Util 'first'; | |
use utf8::all; | |
use autodie; |
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
git checkout-index -a -f --prefix=/Users/Owner/Desktop/app/ |
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
python youtube-dl.py -v -f 18 -o "/Users/Owner/desktop/d/%(uploader)s/%(id)s_%(upload_date)s" |
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
const Cc = Components.classes; | |
const Ci = Components.interfaces; | |
const Cu = Components.utils; | |
Cu.import("resource://gre/modules/Services.jsm"); | |
function log(str) { Services.console.logStringMessage(str); } | |
function showToast(aWindow, message) { aWindow.NativeWindow.toast.show(message, "short"); } | |
var g; |
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 BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from urllib import unquote | |
b=[] | |
class MyHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
if not self.path in b: | |
f.write('<li><a href=%s>%s</a></li>\r\n'%(unquote(self.path)[1:],unquote(self.path)[1:])) | |
b.append(self.path) | |
print self.path |
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
#!perl | |
use v5.16; | |
use utf8; | |
use XML::Smart; | |
use Mojo::DOM; | |
use Benchmark qw( timethese cmpthese ); | |
my $xml = <<'EOF'; | |
<?xml version='1.0' encoding='UTF-8'?><feed gd:etag="W/"A0ACRHgyfyp7I2A9WhNQGUo."" xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:gd="http://schemas.google.com/g/2005" xmlns:media="http://search.yahoo.com/mrss/" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:yt="http://gdata.youtube.com/schemas/2007"><id>tag:youtube.com,2008:user:chemicalsreact14:uploads</id><updated>2012-11-27T01:29:25.697Z</updated><category scheme="http://schemas.google.com/g/2005#kind" term="http://gdata.youtube.com/schemas/2007#video" /><title>Uploads by chemicalsreact14</title><logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo><link href="http://gdata.youtube.com/feeds/api/users/chemicalsreact14?v=2" rel="related" type="application/atom+xml" /><link href="http://www.youtube.com/channel/UC6PnMX0ZSS4hnqGRmByH4gA/videos" rel="alternate" type="text/ht |
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
#perl | |
use v5.16; | |
use warnings; | |
use XML::Smart; | |
use Mojolicious::Lite; | |
my %videos; #videos to be saved; structured <id:[title, author_url, id, duration, [thumbnails]]> | |
my %seen; #videos that have been seen and either saved or rejected; keys are video ids | |
my %authors; #authors whose uploads have been seen; keys are author urls |
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
# -*- coding: utf-8 -*- | |
from reading import mecab | |
from codecs import open | |
print mecab.reading(u'もう 冗談言わないでよ').encode('utf8') |
OlderNewer