This file contains hidden or 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
| baz | |
| AGOOTTESTINGSTRING1 | |
| foo |
This file contains hidden or 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
| aesKeyStringFOOBARBAZQUUXquuxy | |
| aaaa |
This file contains hidden or 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
| aesKeyStringFOOBAR |
This file contains hidden or 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
| Original: http://example.com/foo/%2F/bar | |
| Scheme: http | |
| Hostname: example.com | |
| Path: /foo///bar | |
| Unparsed: http://example.com/foo///bar | |
| Original: http%3A/%2Fexample.com/baz | |
| Scheme: | |
| Hostname: | |
| Path: http://example.com/baz |
This file contains hidden or 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
| >>> urlparse.urljoin("https://base.example.org/", "/foobar") | |
| 'https://base.example.org/foobar' | |
| >>> urlparse.urljoin("https://base.example.org/", "//foobar") | |
| 'https://foobar' |
This file contains hidden or 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
| flashpolicyd runs the policy server that tells flash it can access the port for our echo server. | |
| term_echo_server just logs whatever it receives to the console. | |
| both are python2 and flashpolicyd must run as root unless you have some other way of binding to low ports. |
This file contains hidden or 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
| >>> def compare_parse(url): | |
| ... from urllib3.util.url import parse_url | |
| ... import urlparse | |
| ... print "urlparse:", repr(urlparse.urlparse(url)) | |
| ... print "urllib3:", repr(parse_url(url)) | |
| ... | |
| >>> compare_parse("//foo:a@google.com/") | |
| urlparse: ParseResult(scheme='', netloc='foo:a@google.com', path='/', params='', query='', fragment='') | |
| urllib3: Url(scheme=None, auth=None, host=None, port=None, path='//foo:a@google.com/', query=None, fragment=None) |
This file contains hidden or 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
| #!/bin/bash | |
| #find possibly broken source files that will need to be manually fixed | |
| ( \ | |
| find ../code -type f -iname "*.java" -print0 | xargs --null grep -l '// Byte code:' && \ | |
| find ../code -type f -iname "*.java" -size 0 \ | |
| ) | uniq |
This file contains hidden or 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 praw | |
| from functools import wraps | |
| def init_wrapper(func): | |
| @wraps(func) | |
| def func_wrapper(*args, **kwargs): | |
| ret = func(*args, **kwargs) | |
| if ret: | |
| ret._site_url = ret._site_url.replace('http:', 'https:') | |
| ret._short_domain = ret._site_url.replace('http:', 'https:') |
NewerOlder