Moved to tdhopper.com.
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
"""Implement a version of `IPython.embed()` which works during doctesting. | |
This provides a `dt_embed()` function that is similar to `IPython.embed`, but | |
which can run when used inside code that will be run via doctests (where the | |
default `embed` locks up due to the hijacking of `sys.stdout` that doctest | |
performs. | |
See https://github.com/ipython/ipython/issues/90 for the full details. | |
""" |
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
see now https://github.com/tingletech/greeker.py | |
usage: greeker.py [-h] [--piglatin] [infile] [outfile] | |
Create greeked text for XML testing. | |
positional arguments: | |
infile input XML (or standard input) | |
outfile output greeked XML (or standard out) |
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
{ | |
"meta":{ | |
"limit":20, | |
"logged_in_username":null, | |
"next":null, | |
"offset":0, | |
"previous":null, | |
"total_count":6 | |
}, | |
"objects":[ |
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
The 'value' is the number of documents. To search for documents within a particular collection: | |
http://api.dp.la/v1/items?isPartOf=Albert%20Gore%20Sr.%20Senate%20Collection | |
{"rows":[ | |
{"key":"Digital Library of Georgia,","value":379}, | |
{"key":"Digital Library of Georgia,\"Integrated in all respects\": Ed Friend's Highlander Folk School films and the politics of segregation","value":8}, | |
{"key":"Digital Library of Georgia,\"Thar's gold in them thar hills\": Gold and gold mining in Georgia, 1830s-1940s","value":174}, | |
{"key":"Digital Library of Georgia,1968 sanitation workers strike","value":150}, | |
{"key":"Digital Library of Georgia,A Thousand wheels are set in motion: the buildings of Georgia Tech at the turn of the 20th century, 1888-1908","value":2}, |
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
javascript:var d=document,w=window,l=d.location.href;lats=l.indexOf('!2d')+3;late=l.indexOf('!3d',lats);lat=l.substring(lats,late);lngs=l.indexOf('!3d')+3;lnge=l.indexOf('!',lngs);lnge==-1?lnge=l.length:lnge=lnge;lng=l.substring(lngs,lnge);w.location='http://maps.google.com?q='+lng+','+lat; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 'openssl' | |
require 'base64' | |
ciphertext = Base64.decode64("CIPHERTEXT GOES HERE") | |
passphrase = ENV['PRIVATE_KEY_PASSPHRASE'] # read in from environment | |
private_key = OpenSSL::PKey::RSA.new(File.read('path/to/private_key.pem'), passphrase) | |
plaintext = private_key.private_decrypt(ciphertext, OpenSSL::PKey::RSA::PKCS1_PADDING) | |
puts "Plain text is: " + plaintext |
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
var w = new EventSource("https://wikipedia-edits.herokuapp.com/sse"); | |
w.onmessage = function(event) { | |
change = JSON.parse(event.data); | |
console.log(change); | |
} |
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
#! /bin/sh -e | |
# See | |
# http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/ | |
# https://github.com/jpetazzo/nsenter | |
case "$1" in | |
-h|--help) | |
echo "Usage: docker-enter CONTAINER" | |
exit 0 |
OlderNewer