Skip to content

Instantly share code, notes, and snippets.

View brianclements's full-sized avatar

Brian Clements brianclements

View GitHub Profile
@brianclements
brianclements / Commit Formatting.md
Last active June 28, 2024 16:12
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@mschuerig
mschuerig / docker-enter
Last active February 8, 2017 00:50
Enter a running docker container
#! /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
@ubergarm
ubergarm / docker-nsinit-howto.md
Last active January 11, 2016 16:17
How to compile nsinit for Docker to access a shell in a running container.

Docker nsinit

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.

@soarez
soarez / ca.md
Last active June 19, 2024 19:32
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

#!/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 .``
@kvzhuang
kvzhuang / Dockerfile
Last active September 17, 2018 12:12
My Dockerfile, initial shell script and run shell script.
# DOCKER-VERSION 0.3.4
FROM ubuntu
MAINTAINER Kevin Zhuang <kvzhuang@gmail.com>
#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
@zellio
zellio / fbterm-hacks.md
Last active November 30, 2023 06:45
fbterm, installation and configuration hacks

fbterm setup and config hacks

Installation and setup

Install fbterm via your favorite package manager

pacman -S fbterm
@dupuy
dupuy / README.rst
Last active June 25, 2024 15:05
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

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.

@brennen
brennen / .vimrc
Created December 13, 2011 07:53 — forked from averyvery/.vimrc
Tweaked Vim minimap
function! ToggleMinimap()
if exists("s:isMini") && s:isMini == 0
let s:isMini = 1
else
let s:isMini = 0
end
if (s:isMini == 0)
@abdelazer
abdelazer / epub_to_opds_entry.py
Created April 6, 2011 17:55
A Python program to accept EPUB files as arguments and output an OPDS Catalog Entry skeleton based on the EPUB's metadata
#!/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