This file contains hidden or 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 copy | |
class Field(object): | |
def __init__(self, value=None): | |
self.name = None | |
self.value = value | |
def set_field_name(self, name): | |
""" |
This file contains hidden or 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/python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2010 Grzegorz Sobański | |
# | |
# Git post receive script developed for mlabs | |
# - adds the commits to trac | |
# based on post-receive-email from git-contrib | |
# |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
##################################################### | |
## Cloud CLI is a basic Dropbox client that lets you: | |
## upload, download, move and list files. | |
## | |
## Requirements: cmd2, Dropbox Python SDK | |
###################################################### | |
This file contains hidden or 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 redis | |
import gevent | |
import itertools | |
from gevent import monkey | |
monkey.patch_socket() | |
QUEUE_NAME = 'queue' |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Watchless will compile your less files whenever it detects changes. | |
Accepts one argument, the path where your less files are stored. | |
Say your less files are store in /static/less and it contains the file | |
layout.less, watchless will compile it and store the compiled css file | |
in /static/css/layout.css. |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Watchless will compile your less files whenever it detects changes. | |
Accepts one argument, the path where your less files are stored. | |
Say your less files are store in /static/less and it contains the file | |
layout.less, watchless will compile it and store the compiled css file | |
in /static/css/layout.css. |
This file contains hidden or 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
### | |
Compiles coffee scripts from coffee/ to js/. | |
### | |
fs = require 'fs' | |
{exec} = require 'child_process' | |
util = require 'util' | |
path = require 'path' | |
appFiles = [] |
This file contains hidden or 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 app(environ, start_response): | |
"""Simplest possible application object""" | |
data = 'Hello, World!\n' | |
status = '200 OK' | |
response_headers = [ | |
('Content-type','text/plain'), | |
('Content-Length', str(len(data))) | |
] | |
start_response(status, response_headers) | |
return iter([data]) |
This file contains hidden or 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
# <app>.controllers.root.py | |
class BaseController(object): | |
""" | |
Base controller which main app should extend to auto mount vendor apps. | |
""" | |
def __init__(self): | |
for app, pkg in conf.vendor_apps: | |
root_controller = importlib.import_module("%s.controllers.root" % pkg) | |
setattr(self, app, root_controller.RootController()) |
This file contains hidden or 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 hmac | |
import hashlib | |
import time | |
import uuid | |
SYSTEM_WIDE_SECRET = 'supersecret' | |
GENERATED_TOKENS = {} | |
OlderNewer