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 | |
import gevent.monkey | |
gevent.monkey.patch_all() | |
from hive.helpers.streamserver import HiveStreamServer | |
from hive.helpers.common import create_socket | |
from hive.capabilities import https | |
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 python2 | |
# coding: utf-8 | |
import os,socket,threading,time | |
#import traceback | |
allow_delete = False | |
local_ip = socket.gethostbyname(socket.gethostname()) | |
local_port = 8888 | |
currdir=os.path.abspath('.') |
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 | |
import paramiko | |
hostname = 'localhost' | |
port = 22 | |
username = 'foo' | |
password = 'xxxYYYxxx' | |
if __name__ == "__main__": |
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
{%- macro form_field_label(field) -%} | |
<label for="{{ field.id }}">{{ field.label.text }} | |
{%- if field.flags.required -%} | |
<abbr title="Diese Feld muss angegeben werden">*</abbr> | |
{%- endif %}</label> | |
{% endmacro %} | |
{%- macro form_field_description(field) -%} | |
{% if field.description %} | |
<span class="descr">{{ field.description }}</span> |
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
""" | |
Tools for creating a CA cert and signed server certs. | |
Divined from http://svn.osafoundation.org/m2crypto/trunk/tests/test_x509.py | |
The mk_temporary_xxx calls return a NamedTemporaryFile with certs. | |
Usage ; | |
# Create a temporary CA cert and it's private key | |
cacert, cakey = mk_temporary_cacert() |
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
var urls = [ | |
'http://keyworddomains.com', | |
'http://blog.keyworddomains.com', | |
'http://timer.keyworddomains.com' | |
]; | |
var page = require('webpage').create(); | |
function process(){ | |
if (urls.length == 0){ |
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 | |
import gevent.monkey | |
gevent.monkey.patch_all() | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask | |
app = Flask(__name__) | |
app.debug = True |
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 bash | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
EMPTY_TREE=$(git hash-object -t tree /dev/null) | |
against=$EMPTY_TREE | |
fi |