Skip to content

Instantly share code, notes, and snippets.

PING google.com (74.125.226.4) 56(84) bytes of data.
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=1 ttl=49 time=1276 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=2 ttl=49 time=746 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=3 ttl=49 time=466 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=4 ttl=49 time=642 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=5 ttl=49 time=426 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=6 ttl=49 time=834 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=7 ttl=49 time=1404 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=8 ttl=49 time=745 ms
64 bytes from lga15s42-in-f4.1e100.net (74.125.226.4): icmp_req=9 ttl=49 time=1243 ms
from twisted.internet import defer, reactor, task, threads
def someCrypto():
# Not safe to use Twisted APIs here
result = hard_rsa_method()
return result
@defer.inlineCallbacks
def ciao():
print "antani!"
media@graviton:~$ sudo zpool status
pool: black
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
black ONLINE 0 0 0
ata-WDC_WD10EFRX-68PJCN0_WD-WCC4J4226746-part1 ONLINE 0 0 0
@exarkun
exarkun / Dockerfile-backend
Last active August 29, 2015 14:06
Flocker configuration for a Twisted Web-based virtual hosting frontend server container
FROM ubuntu:14.04
MAINTAINER Jean-Paul Calderone, exarkun@twistedmatrix.com
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y python-twisted-web
RUN apt-get autoremove
RUN apt-get clean
RUN mkdir -p /opt/flocker-links /var/run/flocker-links
# coding: utf-8
from inspect import getsource
from datetime import datetime
from OpenSSL.crypto import FILETYPE_PEM, TYPE_RSA, X509, PKey, dump_privatekey, dump_certificate
key = PKey()
key.generate_key(TYPE_RSA, 2048)
ESC[34mINFOESC[0m[0037] Processing signal 'terminated'
ESC[37mDEBUESC[0m[0037] starting clean shutdown of all containers...
ESC[37mDEBUESC[0m[0037] Clean shutdown succeded
Waiting for /var/run/docker.sock
ESC[37mDEBUESC[0m[0000] Registering HEAD, /containers/{name:.*}/archive
ESC[37mDEBUESC[0m[0000] Registering GET, /images/json
ESC[37mDEBUESC[0m[0000] Registering GET, /images/{name:.*}/get
ESC[37mDEBUESC[0m[0000] Registering GET, /containers/json
ESC[37mDEBUESC[0m[0000] Registering GET, /containers/{name:.*}/archive
ESC[37mDEBUESC[0m[0000] Registering GET, /events
bb-master@cube:~/BuildBot/master$ tail -n 1000 -F twistd.log | grep HTTP
tail: `twistd.log' has been replaced; following end of new file
tail: `twistd.log' has been replaced; following end of new file
tail: `twistd.log' has been replaced; following end of new file
tail: `twistd.log' has been replaced; following end of new file
tail: `twistd.log' has been replaced; following end of new file
2011-03-23 12:30:04-0400 [KeepaliveBroker,0,] <GET /grid HTTP/1.1>
tail: `twistd.log' has been replaced; following end of new file
tail: `twistd.log' has been replaced; following end of new file
tail: `twistd.log' has been replaced; following end of new file
$ virtualenv --no-site-packages -p `which python2.5` test-2.5
Running virtualenv with interpreter /usr/bin/python2.5
New python executable in test-2.5/bin/python2.5
Also creating executable in test-2.5/bin/python
Installing setuptools......................
Complete output from command test-2.5/bin/python2.5 -c "#!python
\"\"\"Bootstrap setuptoo...
from threading import Thread
from twisted.internet import reactor
from twisted.internet.threads import blockingCallFromThread
from twisted.names import client
running = False
def query():
global running
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from ampserver import Sum, Divide
def doMath():
try:
a = raw_input('What number for a ? \n >')
b = raw_input('What number for b? \n >')