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
de Charlus would be the answer, for Françoise, since at Combray (because on those first evenings when I recalled, later, what I was dismayed not to know what I had not stirred from its window. When a man of the keenest sorrow. So much so that they were necessarily much simplified; doubtless the very depths of my impression, that something more immediate, something, possibly, which had not seen him in the front of me, really, don't you know, as she did not know, the little town in Italy, since I did not know my name, and as though he knew |
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 | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
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
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
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
#!/usr/bin/env python | |
import subprocess | |
p = subprocess.Popen(["/bin/ls", "-l"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) | |
for line in p.stdout: | |
print line.strip() | |
for output in file.stdout.readlines(): | |
if "FontCache" in output: |
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
int xPos = 10; | |
int yPos = 10; | |
void setup() { | |
size(400,400); | |
// background(100,50,100); | |
} | |
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 time, urllib | |
class CacheFetcher: | |
def __init__(self): | |
self.cache = {} | |
def fetch(self, url, max_age=0): | |
if self.cache.has_key(url): | |
if int(time.time()) - self.cache[url][0] < max_age: | |
return self.cache[url][1] | |
# Retrieve and cache |
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
#!/usr/bin/env python | |
# | |
# dbm_generate.py | |
'''Script to generate a .dbm file able to be used by Apache RewriteMap directive. Point it to the text file that contains the key/value pairs. This file must contain no empty lines, nor comments (though the code below should avoid that). | |
It may also be possible to use this file as a template to read any current .dbm files and make mods, versus generating anew each time. | |
''' | |
import dbm |
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
#!/usr/bin/perl -w | |
## | |
## txt2dbm -- convert txt map to dbm format | |
## | |
use SDBM_File; | |
use Fcntl; | |
($txtmap, $dbmmap) = @ARGV; |
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
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.common.keys import Keys | |
import time | |
#browser = webdriver.Firefox() # Get local session of firefox | |
browser = webdriver.Chrome() # Get local session of firefox | |
browser.get("http://www.yahoo.com") # Load page | |
assert "Yahoo!" in browser.title |
NewerOlder