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 urllib | |
import re | |
import time | |
data = urllib.urlopen('http://bitly.measuredvoice.com/bitly_archive/?C=M;O=D').read() | |
#print data | |
#datafiles name pattern - usagov_bitly_data2011-07-29-1311919454 |
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
Via Electronic Freedom Frontier website, under Creative Commons License .../by/3.0/us/ | |
"Cryptolog is a simple log filter program that reads log file entries from standard input | |
and writes to either a file or pipes them to the standard input of another program | |
(like logrotate or cronolog). The filter takes the IP address in the entry | |
(everything before the first space character) and encrypts it, throwing away the key. | |
Technically, cryptolog takes 16 bytes of random data from /dev/urandom and | |
stores it in a file (called the salt). It then calculates a sha256 hash of the | |
salt concatonated with the original IP address, base64-encodes that, and chops | |
off the first six characters of the result. That's what gets stored instead of |
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
<container> | |
<thing /> | |
<!-- | |
I think this is the least horrible way to format XML comment | |
blocks. Even though it wastes two lines, at least it doesn't | |
involve tons of indenting or horribly misaligned edges. | |
--> | |
<fooblah size="10" count="alot" /> | |
</container> |
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
require 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
end |
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
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cross-browser kerning-pairs & ligatures</title> | |
<style> | |
body { font-family: sans-serif; background: #f4f3f3; color: rgba(40, 30, 0, 1); width: 500px; margin: 80px auto; padding: 0px; } | |
a { color: rgba(15, 10, 0, 0.8); text-decoration: none; border-bottom: 1px solid; padding: 1px 1px 0px; -webkit-transition: background 1s ease; } | |
a:hover { background: rgba(0, 220, 220, 0.2); } | |
p, li { line-height: 1.5; padding: 0em 1em 0em 0em; margin: 0em 0em 0.5em; } |
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
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Simple Password - Returns a simple pronouncable passphrase. | |
Examples: Motir27, Wesag97, Muvak41 | |
Rated as 'good' by http://www.passwordmeter.com/ | |
@access public | |
@return string | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ | |
function simple_password() { |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>index</title> | |
<link rel="stylesheet" href="style.css" type="text/css" media="screen" /> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> | |
<script type="text/javascript" src="mustache.js"></script> | |
<script type="text/javascript" src="app.js"></script> |
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
protected $authentication = 'none'; // Can be 'none', 'basic' or 'digest' | |
protected $username = FALSE; | |
protected $password = FALSE; | |
protected $key = FALSE; | |
protected $format = 'html'; | |
protected $supported_formats = array( | |
'html' => 'text/html', | |
'php' => 'text/plain', |
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
Single-line version of pattern: | |
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) | |
Extended version of same pattern: | |
(?xi) | |
\b | |
( # Capture 1: entire matched URL |