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
vagrant@precise64:/tmp$ virtualenv venv | |
New python executable in venv/bin/python2.7 | |
Also creating executable in venv/bin/python | |
Installing Setuptools..............................................................................................................................................................................................................................done. | |
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done. | |
vagrant@precise64:/tmp$ cd venv/ | |
vagrant@precise64:/tmp/venv$ git clone https://github.com/Pylons/substanced/ | |
Cloning into 'substanced'... | |
remote: Reusing existing pack: 17699, done. |
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
# -- directive/role definition ------------------------------------------------> | |
from docutils.parsers.rst.directives.admonitions import BaseAdmonition | |
from docutils import nodes | |
from sphinx.util.compat import make_admonition | |
class NamedNoteDirective(BaseAdmonition): | |
node_class = nodes.admonition | |
css_class = 'note' |
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
from colander import MappingSchema, SchemaNode, String, Invalid | |
import string | |
def combined_validator(node, value): | |
if value.get('name') != value.get('value'): | |
raise Invalid(node, 'name and value must be identical. {!r}'.format(value)) | |
class Schema1(MappingSchema): |
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
sys.path.insert(0, os.path.abspath('.')) | |
extensions = ['localtoc'] | |
html_sidebars = {'somepage': ['localtoc.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
role :'foo-monitor', 'test-monitor' | |
role :'foo-log', 'test-log1' | |
role :'foo-ap', 'test-ap1' | |
role :'foo-web', 'test-web1' | |
role :'foo-mysql', 'test-mysql1' | |
role :'foo-redis', 'test-redis1' | |
set :user, 'chef' |
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 | |
from docutils import nodes | |
from sphinx.util.compat import Directive, make_admonition | |
class writer(nodes.Admonition, nodes.Element): | |
pass | |
class writerlist(nodes.General, nodes.Element): | |
pass |
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 re | |
from collections import OrderedDict #python2.7 or later | |
import MeCab | |
class DetermineDescriptor(object): |
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
# Cookbook Name:: myrecipe | |
# Recipe:: mysql_databases | |
# | |
# Copyright 2013, Takayuki SHIMIZUKAWA | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
description "memcached" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
#Send KILL after 5 seconds | |
respawn | |
respawn limit 5 60 | |
env DAEMON=memcached | |
env PORT=11211 |
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
# -- directive/role definition ------------------------------------------------> | |
from docutils.parsers.rst.directives.admonitions import BaseAdmonition | |
from docutils import nodes | |
from sphinx.util.compat import make_admonition | |
class NamedNoteDirective(BaseAdmonition): | |
node_class = nodes.admonition | |
#required_arguments = 1 |