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 bottle | |
from bottle import route | |
def websafe(func): | |
""" | |
A decorator function for preventing cross-site scriting attacks | |
""" | |
def wrapper(*args, **kwargs): |
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 signal | |
import logging | |
import base64 | |
import routes | |
import routes.middleware | |
import webob |
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/bash | |
COMMON_DIRS=(bin doc etc tests) | |
COMMON_FILES=(README ABOUT INSTALL TODO NEWS CHANGELOG LICENSE Makefile) | |
BASE_PATH=$PROJECT_PATH/$PROJECT_NAME | |
function create_directories { | |
mkdir -p $BASE_PATH/$PROJECT_NAME |
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
PACKAGE=mypackage | |
MIN_COVERAGE=90 | |
# NOTE: Be careful, rm -rf will be called on this! | |
COVERAGE_HTML_DIR=coverage/ | |
VERBOSITY=2 | |
.PHONY: all dev install test coverage clean | |
all: test |
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
{ | |
"color_scheme": "Packages/User/Tomorrow-Night (SL).tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"find_selected_text": true, | |
"fold_buttons": false, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", |
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
{ | |
"TxnID": "667B-1055542407", | |
"TimeCreated": "2003-06-13T15:13:27-08:00", | |
"TimeModified": "2019-12-14T11:35:28-08:00", | |
"EditSequence": "1576351936", | |
"TxnNumber": "1276", | |
"CustomerRef": { | |
"ListID": "6D0000-1046201334", | |
"FullName": "Pete Harbin Contractor:Oak Street" | |
}, |
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 urllib2 | |
import zipfile | |
import MySQLdb | |
class AlexaUpdater(): | |
def __init__(self, user, password, db_name, table_name, host='localhost', | |
charset='utf8'): | |
self.host = host |
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 hudson.plugins.warnings.parser.Warning | |
import hudson.plugins.analysis.util.model.Priority | |
String fileName = matcher.group(1) | |
String type = matcher.group(4) | |
String lineNumber = matcher.group(2) | |
String message = matcher.group(5) | |
String typeCategory = String.valueOf(type.charAt(0)); | |
String category | |
Priority priority = Priority.NORMAL |
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
{% if messages %} | |
{% for message in messages %} | |
<div class="alert alert-{{ message.tags }} alert-dismissible text-center" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<strong>{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}Error{% else %}{{ message.tags|title }}{% endif %}!</strong> {{ message }} | |
</div> | |
{% endfor %} | |
{% endif %} |
OlderNewer