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
#!/usr/bin/env python | |
# | |
# Copyright 2013 Joseph Bowman | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
import os | |
import sys | |
import time | |
import Image | |
import base64 | |
import urllib | |
import urllib2 | |
import datetime | |
import cStringIO | |
import ImageChops |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"compress/gzip" | |
"flag" | |
"fmt" | |
"io" | |
"log" |
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 binascii | |
import hashlib | |
import hmac | |
import logging | |
import time | |
import urllib | |
import urlparse | |
import uuid | |
from tornado import httpclient |
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
class YoutubeMixin(OAuth10aMixin): | |
""" To authenticate with Youtube, register your application with Google. | |
See http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html | |
Then copy your Consumer Key and Consumer Secret to the application settings | |
'google_consumer_key' and 'google_consumer_secret'. Use this Mixin on the | |
handler for the URL you registered as your application's Callback URL. | |
When your application is set up, you can use this Mixin like this | |
to authenticate the user with Twitter and get access to their stream: |
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
#!/usr/bin/env python | |
# | |
# Copyright 2009 Facebook | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
# not pretty, I quickly moved to another idea | |
# not involving the Twitter stream. Good starting | |
# point. | |
import re | |
import base64 | |
import socket | |
import asyncmongo | |
from tornado import ioloop | |
from tornado import iostream |
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
require 'net/http' | |
require 'uri' | |
if ARGV.length < 2 | |
puts "Syntax: urltest.rb [ redirects file ] [host ] (optional 1 for external redirects)" | |
puts "example for local redirects: urltest.rb vanity_urls.txt www.example.com" | |
exit | |
end | |
if File.exists?(ARGV[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
<input type="text" name="q" id="q" /> | |
<script type="text/javascript"> | |
YUI().use("autocomplete", "autocomplete-highlighters", "datasource-get", function (Y) { | |
var acDS = new Y.DataSource.Get({ | |
source: "http://sugg.search.yahoo.com/gossip-us-fp/?nresults=10&queryfirst=2&output=json&version=&command=", | |
}); | |
Y.one('#q').plug(Y.Plugin.AutoComplete, { | |
maxResults: 10, | |
resultHighlighter: 'phraseMatch', |
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
--- local.search results | |
<?xml version="1.0" encoding="UTF-8"?> | |
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" | |
yahoo:count="0" yahoo:created="2010-12-13T20:02:06Z" yahoo:lang="en-US"> | |
<diagnostics> | |
<publiclyCallable>true</publiclyCallable> | |
<url execution-time="40" http-status-code="503" http-status-message="Service Unavailable"><![CDATA[http://local.yahooapis.com/LocalSearchService/V3/localSearch?zip=94085&query=pizza&start=1&results=10]]></url> | |
<user-time>62</user-time> | |
<service-time>40</service-time> |
NewerOlder