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
| """ krest 0.22: | |
| A kule based, SSL enabled, read-only rest interface for a configuration | |
| management schema on top of MongoDB. The assumed layout for krest to | |
| read configuration data is this: you must have a database called "config", | |
| and inside "config", you have collections for each environment (i.e. | |
| "prod", "test", and "dev"). Inside each collection, documents fit the | |
| following schema: | |
| {'app':app_name, 'config': <arbitrary configuration json> } |
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
| if __name__ == '__main__': | |
| # a neat hack that makes this file a "self-hosting" fabfile, | |
| # ie it is invoked directly but still gets all the fabric niceties | |
| # like real option parsing, including --help and -l (for listing | |
| # commands). note that as of fabric 1.10, the file for some reason | |
| # needs to end in .py, despite what the documentation says. see: | |
| # http://docs.fabfile.org/en/1.4.2/usage/fabfiles.html#fabfile-discovery | |
| # | |
| # the .index() manipulation below should make this work regardless of | |
| # whether this is invoked from shell as "./foo.py" or "python foo.py" |
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/env python | |
| import sys | |
| import SocketServer | |
| import BaseHTTPServer | |
| import SimpleHTTPServer | |
| class ThreadingSimpleServer( | |
| SocketServer.ThreadingMixIn, | |
| BaseHTTPServer.HTTPServer): |
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/env python | |
| """ dd_event: | |
| a quick utility for writing events to the Datadog events stream. | |
| requires: | |
| pip install dogapi | |
| pip install argparse | |
| """ | |
| import argparse |
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
| /* Epydoc CSS Stylesheet | |
| * | |
| * This is a massivley hacked stylesheet for epydoc, the very nice Python API | |
| * Documentation generator. The general look and feel is based on sphinx. | |
| * https://raw.githubusercontent.com/garethr/epydoc-themes/master/epydoc.css | |
| * | |
| * Feel free to tweak this some more to make the theme even more pleasing | |
| * if you have the time to spare for such things. The typography in particular | |
| * could do with sorting out. Unless you like writing masocistic CSS however, | |
| * I'd recommend looking to refactor the markup generated by epydoc. |
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
| site_name: Placeholder | |
| theme: readable | |
| repo_url: https://github.com/mattvonrocketstein/placeholder.git | |
| site_author: mvr | |
| pages: | |
| - 'Main page': 'index.md' | |
| - 'API Reference': 'api/index.html' |
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
| defmacro print(thing) do | |
| if String.valid?(thing) do | |
| quote bind_quoted: binding() do | |
| IO.puts thing | |
| end | |
| else | |
| quote bind_quoted: binding() do | |
| IO.puts("#{inspect thing}") | |
| end | |
| end |
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 -*- | |
| import os | |
| from fabric import api | |
| from fabric import colors | |
| from fabric.contrib.console import confirm | |
| _ope = os.path.exists | |
| _mkdir = os.mkdir | |
| _expanduser = os.path.expanduser | |
| _dirname = os.path.dirname |
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/env python | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import contextlib | |
| from fabric import api | |
| PKG_NAME = 'MY_PKG' | |
| VULTURE_EXCLUDE_PATHS = ['tests', ] | |
| VULTURE_IGNORE_FUNCTIONS = ['commandline_entry_point'] |
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 -*- | |
| import os | |
| import sys | |
| from fabric import api | |
| from fabric import colors | |
| from fabric.contrib.console import confirm | |
| PKG_NAME = 'PKG_NAME' | |
| THIS_DIR = os.path.dirname(os.path.abspath(__file__)) |