Skip to content

Instantly share code, notes, and snippets.

Avatar
♥️
TIANON

Tianon Gravi tianon

♥️
TIANON
View GitHub Profile
View inspect2run.sh
#!/bin/bash
set -e
str='docker run'
str+=' {{printf "--name=%q" .Name}}'
str+='{{if (eq .HostConfig.NetworkMode "bridge")}} {{printf "--hostname=%q" .Config.Hostname}}{{else}} {{printf "--net=%q" .HostConfig.NetworkMode}}{{end}}'
str+='{{if .Config.OpenStdin}} --interactive{{end}}'
str+='{{if .Config.Tty}} --tty{{end}}'
@tianon
tianon / create-sbuild-chroot.sh
Last active Dec 13, 2019
SUPERSEDED BY https://github.com/tianon/debian-bin -- collection of useful sbuild-related scripts
View create-sbuild-chroot.sh
#!/bin/bash
set -eu
# https://gist.github.com/tianon/a0080cbca558e4b907fe
suite="${1:-}"
shift || { echo >&2 "usage: $0 suite [arch]"; exit 1; }
targetSuite="$suite"
case "$targetSuite" in
@tianon
tianon / etc-apt-sources.list
Created Jul 10, 2019
Perpetually Debian Jessie via NGINX
View etc-apt-sources.list
deb http://example.com/jessie jessie main
deb http://example.com/jessie-security jessie main
deb http://example.com/jessie jessie-updates main
@tianon
tianon / put-multiarch-prototype.sh
Last active May 11, 2019
The original Bash-based prototype for https://github.com/docker-library/official-images/pull/5897 to prove out the concept \m/
View put-multiarch-prototype.sh
#!/usr/bin/env bash
set -Eeuo pipefail
# for real pushes, this would be "library"
targetOrg='trollin'
# https://github.com/tianon/dockerhub-public-proxy
publicProxy="$DOCKERHUB_PUBLIC_PROXY"
_curl() {
View debootstrap.log
gpgv: Signature made Tue Mar 3 14:00:20 2015 MST using RSA key ID 46925553
gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>"
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
missing description
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
missing architecture
Selecting previously unselected package base-passwd.
(Reading database ... 0 files and directories currently installed.)
Preparing to unpack .../base-passwd_3.5.37_amd64.deb ...
Unpacking base-passwd (3.5.37) ...
@tianon
tianon / vizio-gv42l-xorg.conf
Last active Mar 7, 2017
Vizio GV42L in Linux without overscan
View vizio-gv42l-xorg.conf
# see https://lists.gt.net/mythtv/users/334412#334412
Section "Monitor"
Identifier "VizioGV42L"
VendorName "VIZIO"
ModelName "GV42L"
HorizSync 31.0 - 70.0
VertRefresh 50.0 - 85.0
Option "DPMS"
@tianon
tianon / nginx-go.conf
Last active Dec 13, 2016
configuration behind go.tianon.xyz, inspired by https://twitter.com/jessfraz/status/782333853117448192
View nginx-go.conf
# inspired by https://twitter.com/jessfraz/status/782333853117448192
# https://gist.github.com/jessfraz/421918a367a71dbaf72fdc772d809f61
# https://gist.github.com/tianon/c5ae888200d6426b167d4961d088dee2
server {
listen 80;
listen 443 ssl http2;
server_name go.tianon.xyz;
View keybase.md

Keybase proof

I hereby claim:

  • I am tianon on github.
  • I am tianon (https://keybase.io/tianon) on keybase.
  • I have a public key whose fingerprint is B42F 6819 007F 00F8 8E36 4FD4 036A 9C25 BF35 7DD4

To claim this, I am signing this object:

@tianon
tianon / jessie-1-2.diff
Created Jul 8, 2016
"debootstrap --variant=minbase jessie jessie-N http://snapshot.debian.org/archive/debian/20160101" reproducibility testing
View jessie-1-2.diff
diff --git a/jessie-1.tar.tv b/jessie-2.tar.tv
index a0a88dc..a3b3f44 100644
--- a/jessie-1.tar.tv
+++ b/jessie-2.tar.tv
@@ -1,35 +1,35 @@
-drwxr-xr-x root/root 0 2016-07-08 14:04 ./
-drwxr-xr-x root/root 0 2016-07-08 14:03 ./dev/
-crw-rw-rw- root/root 1,5 2016-07-08 14:03 ./dev/zero
-lrwxrwxrwx root/root 0 2016-07-08 14:03 ./dev/stderr -> /proc/self/fd/2
-lrwxrwxrwx root/root 0 2016-07-08 14:03 ./dev/stdin -> /proc/self/fd/0
@tianon
tianon / apt-mark-minimum-manual.sh
Last active May 13, 2016
discover the minimum set of packages that need to be "apt-mark manual" to keep what's currently installed
View apt-mark-minimum-manual.sh
#!/bin/bash
set -e
# https://gist.github.com/tianon/b7fce03f0d52f8103242421878fc6b5e
#
# usage:
#
# $ apt-mark-minimum-manual.sh
# inetutils-ping