GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
#!/bin/bash | |
function flask-boilerplate-tmux | |
{ | |
# https://github.com/swaroopch/flask-boilerplate | |
BASE="$HOME/code/flask-boilerplate" | |
cd $BASE | |
tmux start-server | |
tmux new-session -d -s flaskboilerplate -n model |
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
epub_to_opds_entry.py | |
Created by Keith Fahlgren on Tue Apr 5 21:21:02 PDT 2011 | |
Copyright (c) 2011 Threepress. All rights reserved. | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without |
function! ToggleMinimap() | |
if exists("s:isMini") && s:isMini == 0 | |
let s:isMini = 1 | |
else | |
let s:isMini = 0 | |
end | |
if (s:isMini == 0) |
# DOCKER-VERSION 0.3.4 | |
FROM ubuntu | |
MAINTAINER Kevin Zhuang <[email protected]> | |
#RUN echo "This is a ubuntu Dockerfile." | |
#replace source.list with http://repogen.simplylinux.ch/ | |
RUN echo "deb http://02.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse" > /etc/apt/sources.list | |
RUN apt-get update |
#!/usr/bin/env python3 | |
"""Backs up data-only volumes to host backup directory using rdiff-backup. | |
First create a Docker image containing rdiff-backup (named rdiff-backup) | |
Dockerfile: | |
FROM ubuntu:precise | |
RUN apt-get update && apt-install -qy rdiff-backup | |
``docker build -rm -t rdiff-backup .`` |
nsinit
provides a handy way to access a shell inside a running container's namespace. This is useful for learning about how containers work, debugging your system without worrying about sshd daemons, and even hot fixes in production all you sad pandas!
:p
Running the docker daemon with the lxc driver allows you to use lxc-attach
to do this. But now that docker deafults to the new native libcontainer driver, nsinit
is probably the best way to go. jpetazzo's blog has a great high level summary.
The new issue is that the libcontainer .json format is under heavy development so you need to keep an nsinit
binary built from the exact release tag from the the docker github repo. The tricky part for me was understanding that golang is designed with certain assumptions about dependencies vs versioning with regards to when you push to master, push to a topic branch, and fork a project.
#! /bin/sh -e | |
# See | |
# http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/ | |
# https://github.com/jpetazzo/nsenter | |
case "$1" in | |
-h|--help) | |
echo "Usage: docker-enter CONTAINER" | |
exit 0 |