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
#!/bin/sh | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
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
def asciify(data): | |
""" | |
SYNOPSIS | |
Asciifies strings, lists and dicts, and nested versions of same | |
DESCRIPTION | |
The JSON spec (http://www.ietf.org/rfc/rfc4627.txt) -- "JSON text SHALL | |
be encoded in Unicode". For apps that don't use unicode, this function | |
walks through all levels of a JSON data structure and converts each item | |
to ASCII. See http://stackoverflow.com/questions/956867/ for original. |
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
{%- 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
#!/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__": |