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
<?php | |
track_http_event('request/view', array( | |
'request' => array( | |
'id' => $request->id, | |
'owning_user_id' => $request->owner()->id | |
) | |
)); |
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
_id: 4db78bfe40d675666e120000 | |
type: 'request/view' | |
time: 2011-04-27T03:22:38Z | |
http: # Information about the HTTP request: | |
method: 'GET' | |
ip: '50.23.214.120' | |
url: '/request/N6coXG' # The actual URL that was requested | |
endpoint: '/request' # The request handler that got the request | |
referrer: null |
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
eric ~/.vim $ pwd | |
/Users/eric/.vim | |
eric ~/.vim $ ls bundle | |
syntastic vim-fugitive | |
eric ~/.vim $ mvim --version | |
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 15 2010 22:03:01) | |
MacOS X (unix) version | |
Compiled by Bjorn Winckler <[email protected]> |
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
$ dig -x 66.249.71.47 +short | |
crawl-66-249-71-47.googlebot.com. | |
$ dig crawl-66-249-71-47.googlebot.com. +short | |
66.249.71.47 |
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
66.249.71.47 - - [04/Sep/2011:04:53:52 +0000] "POST /act/site/clienterror HTTP/1.1" 200 36 "http://www.thumbtack.com/ma/malden/dog-walking/dog-walking-and-pet-care-services" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" | |
66.249.72.198 - - [25/Sep/2011:04:27:50 +0000] "POST /act/site/clienterror HTTP/1.1" 200 36 "http://www.thumbtack.com/ca/solana-beach/wedding-photographers/photography-cary-pennington-photography" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" | |
66.249.72.207 - - [04/Oct/2011:09:53:08 +0000] "POST /act/site/clienterror HTTP/1.1" 200 36 "http://www.thumbtack.com/tx/san-antonio/painting/residential-commercial-construction-services" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" |
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
[ | |
["X", "O", ".", ".", ".", ".", ".", "O", "X"], | |
["X", "O", ".", ".", ".", ".", ".", "O", "X"], | |
["O", ".", ".", ".", ".", ".", ".", "O", "X"], | |
[".", ".", ".", ".", "X", "X", ".", "X", "O"], | |
[".", ".", ".", "X", "O", "O", "X", ".", "."], | |
[".", ".", ".", ".", "X", "O", "X", ".", "."], | |
[".", "O", "X", ".", ".", ".", ".", ".", "."], | |
["O", "X", "O", ".", ".", ".", ".", ".", "."], | |
[".", "O", "X", "X", ".", ".", ".", ".", "."] |
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
[ | |
[".", ".", ".", ".", ".", ".", "."], | |
[".", ".", ".", ".", ".", ".", "."], | |
[".", ".", "O", ".", ".", ".", "."], | |
[".", ".", "X", "O", "X", "X", "."], | |
[".", ".", "X", "X", "O", "O", "X"], | |
[".", ".", "O", "X", "X", "O", "X"] | |
] |
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 | |
from itertools import product, repeat | |
import json | |
import sys | |
PLAYERS = ['X', 'O'] | |
RUN_LENGTH = 4 | |
def value_at(board, coordinate): |
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 json | |
import re # Now I have two problems! | |
def munge(board): | |
num_rows = len(board) | |
rows = [''.join(row) for row in board] | |
cols = [''.join(col) for col in zip(*board)] | |
diag1 = [''.join(diag) for diag in | |
zip(*[' ' * offset + ''.join(row) for row, offset in | |
zip(board, range(num_rows))])] |
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
# This code is horrible but you wanted the computation to be done in a single | |
# generator expression. Cheers! | |
import json | |
import sys | |
def resize(grid): | |
for line in grid: | |
line.extend(['.'] * 3) | |
header = [['.'] * 10] * 3 |