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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>A simple clock</title> | |
</head> | |
<body translate="no" > |
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 sys | |
DATA = b"\x01\x01\x01\x01\x02\x02\x02\x02\x02\x02\x03\x03\x04\x02\x01\x09\x09\\0" | |
sys.stdout.write(DATA) | |
sys.stdout.flush() |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
[myvpn] | |
MEDIA=rastapi | |
Port=VPN2-0 | |
Device=WAN Miniport (IKEv2) | |
DEVICE=vpn | |
PhoneNumber=pptp.vpn.address |
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 | |
# | |
# tap -> flume | |
# | |
# requires: python thrift bindings + compiled flume thrift binding. | |
# | |
import sys | |
import time | |
import struct |
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 logging | |
import riak | |
log = logging.getLogger(__name__) | |
class RiakCounter(object): | |
def __init__(self, bucket, key): | |
self.bucket = bucket | |
self.bucket.set_allow_multiples(True) | |
self.key = key |
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
# Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details. | |
"""UDP/SSL server""" | |
import sys | |
import errno | |
import traceback | |
from gevent import socket | |
from gevent import core | |
from gevent.baseserver import BaseServer | |
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 gevent, gevent.event | |
import threading, Queue, collections, time, functools | |
def _threads_poller_f(): | |
while _OsThread._threads_count: | |
try: | |
t, rv, isexc = _OsThread._threads_results.get_nowait() | |
except Queue.Empty: | |
gevent.sleep() | |
else: |