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 | |
""" triage.py reformats radon output | |
this code anticipates a command line usage as follows: | |
$ triage.py ./code | |
it works by reformatting the output of a radon command-line similar to this: | |
$ radon cc ./code/ --total-average --show-complexity > radon.out |
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
vagrant@devbox:~$ git lo | |
log lol lola | |
vagrant@devbox:~$ git lo | |
git: 'lo' is not a git command. See 'git --help'. | |
Did you mean one of these? | |
log | |
lol |
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 | |
""" pybcompgen | |
Pybcompgen calculates context sensitive tab-completion data which is | |
derived from environment bash system settings. It doesn't need to know | |
anything about whether you use /etc/completion or /etc/bash_completion.d, | |
all that matters is whether *bash* knows about the completion. The benefit | |
of doing this are obvious: you get access to all the completion features | |
that the system has installed without caring how the completion features | |
work. Note that this approach doesn't just work for things in the users |
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
# | |
# this code downloads all the grays anatomy images on wikimedia into ./grays_anatomy_plates | |
# | |
import time | |
import os, urllib2 | |
from BeautifulSoup import BeautifulSoup | |
plates_url = 'http://commons.wikimedia.org/wiki/Gray%27s_Anatomy_plates' | |
base = 'https://commons.wikimedia.org' | |
save_dir = 'grays_anatomy_plates' |
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 | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
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
""" 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 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 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 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 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' |
OlderNewer