Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tk0miya's full-sized avatar

Takeshi KOMIYA tk0miya

View GitHub Profile
@tk0miya
tk0miya / pkt-route.dot
Created April 12, 2012 09:03 — forked from darkk/pkt-route.dot
Thinking about UDP packet routing (redsocks+TPROXY)
digraph {
subgraph interfaces {
node [shape = folder];
host_if_inet;
host_if_lxc;
lxc_if;
lxc_if;
}
lxc_default_route [label = "default route"];
@tk0miya
tk0miya / conf.py
Created April 26, 2012 02:46
Define original roles and styles in Sphinx docs
sys.path += ['.']
extensions += ['sphinxcontrib_roles']
# configuration case.1: define roles as list (define only roles)
roles = ['strike', 'red']
# configuration case.2: define roles as dict (define roles and its style on HTML)
roles = {'strike': "text-decoration: line-through;",
'red': "color: red;" }
@tk0miya
tk0miya / sphinxcontrib_footnote.py
Created April 27, 2012 08:55
footnote role for Sphinx
# -*- coding: utf-8 -*-
import os
from docutils import nodes
from docutils.parsers.rst import roles
class footnote_defs(nodes.General, nodes.Element):
pass
@tk0miya
tk0miya / index.rst
Created May 10, 2012 10:21
directory list directive for Sphinx
.. dir:: /tmp

/tmp

@tk0miya
tk0miya / sphinxcontrib_slide.py
Created August 10, 2012 15:09
sphinxcontrib_slide.py
# -*- coding: utf-8 -*-
"""
sphinxcontrib.slide
~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2012 by Takeshi KOMIYA
:license: BSD, see LICENSE for details.
"""
import os
@tk0miya
tk0miya / index.txt
Last active January 29, 2019 23:03
sphinxcontrib_wikitable.py
Usage
======
.. wiki-table::
:header-rows: 1
:widths: 2 3 5
|id|header1|header2|
|1|hello|world|
|2|foo|:strong:`bar`|
@tk0miya
tk0miya / conf.py
Created August 22, 2012 08:20 — forked from anonymous/conf.py
sphinxcontrib_googlemaps
sys.path.insert(0, '.')
extensions += ['sphinxcontrib_googlemaps']
@tk0miya
tk0miya / gist:3890652
Created October 15, 2012 03:12
Install RVM to jenkins recipe #chef
# This recipe is unused
# Please use RVM-Plugin for Jenkins
include_recipe "jenkins"
script "Install RVM to jenkins" do
interpreter "bash"
not_if {::File.exists?("/var/lib/jenkins/.rvm")}
code <<-EOH
sudo -u jenkins bash -c '
@tk0miya
tk0miya / buildout.cfg
Created November 5, 2012 01:44
xaxtsuxo_to_excel.py
[buildout]
parts = app
[app]
recipe = zc.recipe.egg
eggs =
PIL
openpyxl
interpreter = py
@tk0miya
tk0miya / index.txt
Created November 8, 2012 02:32
sphinxcontrib_section_autoref
===================
Example of autoref
===================
Section 1
==========
You can write reference to section title without any definitions:
:ref:`Section 1`