Skip to content

Instantly share code, notes, and snippets.

View tianon's full-sized avatar
♥️
TIANON

Tianon Gravi tianon

♥️
TIANON
  • @docker, but thoughts, comments, commits generally his own ("do not represent the views of Docker, Inc" etc etc)
  • Las Vegas, NV
  • 15:30 (UTC -07:00)
  • X @tianon
View GitHub Profile
#!/bin/bash
set -e
# https://gist.github.com/tianon/92ebbd1793864b9586bc
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
hackVendor="$(< hack/vendor.sh)"
if [ "$1" ]; then
hackVendor="$(git show "$1":hack/vendor.sh)"
@tianon
tianon / driver.go
Last active April 21, 2016 22:37
docker-machine-driver-template
package main
import (
"fmt"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/mcnflag"
"github.com/docker/machine/libmachine/state"
)
#!/bin/bash
set -e
# hello-world latest ef872312fe1b 3 months ago 910 B
# hello-world latest ef872312fe1bbc5e05aae626791a47ee9b032efa8f3bda39cc0be7b56bfe59b9 3 months ago 910 B
# debian latest f6fab3b798be 10 weeks ago 85.1 MB
# debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB
usage() {
@tianon
tianon / irssi-config-keyboard
Last active August 29, 2015 14:07
"keyboard = ();" from irssi
keyboard = (
{ key = "^Z"; id = "change_window"; data = "1"; },
{ key = "meta-1"; id = "change_window"; data = "1"; },
{ key = "meta-2"; id = "change_window"; data = "2"; },
{ key = "meta-3"; id = "change_window"; data = "3"; },
{ key = "meta-4"; id = "change_window"; data = "4"; },
{ key = "meta-5"; id = "change_window"; data = "5"; },
{ key = "meta-6"; id = "change_window"; data = "6"; },
{ key = "meta-7"; id = "change_window"; data = "7"; },
{ key = "meta-8"; id = "change_window"; data = "8"; },
#!/bin/bash
set -e
function RUN() {
nsinit exec -- "$@"
}
function COMMIT() {
git add -A
#!/bin/bash
set -e
function RUN() {
nsinit exec -- "$@"
}
function COMMIT() {
git add -A
@tianon
tianon / sed-xdg-user-dirs.sh
Last active August 29, 2015 14:02
fix stupid user-dirs.defaults
sudo sed -ri 's/=.*/\L&/g; s/public$/public-share/; s/documents/docs/g; s/pictures/pics/g' /etc/xdg/user-dirs.defaults
xdg-user-dirs-update --force
@tianon
tianon / Dockerfile
Last active August 29, 2015 14:00
Debian Potato Docker Base Image
FROM scratch
ADD rootfs.tar.xz /
CMD ["/bin/bash"]
@tianon
tianon / curl-docker-build.sh
Last active August 29, 2015 13:56
Testing "docker build" Remote API Endpoint Using Curl
{ echo 'FROM debian'; echo 'RUN apt-get update'; } | perl -w -MArchive::Tar -e 'my $tar = Archive::Tar->new; { local $/; $tar->add_data("Dockerfile", <>); } print $tar->write' | curl --data-binary @- --header 'Content-Type: application/x-tar' --dump-header - --no-buffer 'http://localhost:4243/build?rm=1&nocache=1'