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
  • 11:53 (UTC -07:00)
  • X @tianon
View GitHub Profile
@tianon
tianon / vizio-gv42l-xorg.conf
Last active March 7, 2017 04:14
Vizio GV42L in Linux without overscan
# 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 December 13, 2016 23:03
configuration behind go.tianon.xyz, inspired by https://twitter.com/jessfraz/status/782333853117448192
# 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;
@tianon
tianon / apt-mark-minimum-manual.sh
Last active May 13, 2016 19:13
discover the minimum set of packages that need to be "apt-mark manual" to keep what's currently installed
#!/bin/bash
set -e
# https://gist.github.com/tianon/b7fce03f0d52f8103242421878fc6b5e
#
# usage:
#
# $ apt-mark-minimum-manual.sh
# inetutils-ping
@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"
)
@yosifkit
yosifkit / git-diff-process-substitution.patch
Last active February 17, 2022 19:20
dev-vcs/git-2.4.10 patch for git diff to work for process substitution: `$ git diff --color-words <(echo a b c) <(echo a d c)`
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index bbab35f..f4ca476 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -99,10 +99,17 @@ include::diff-options.txt[]
<path>...::
The <paths> parameters, when given, are used to limit
the diff to the named paths (you can give directory
names and get diff for all files under them).
@tianon
tianon / create-sbuild-chroot.sh
Last active December 13, 2019 03:36
SUPERSEDED BY https://github.com/tianon/debian-bin -- collection of useful sbuild-related scripts
#!/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
@ceilfors
ceilfors / cleanupUnusedWorkspaceInSlaves.groovy
Last active September 14, 2023 20:30
When you delete jobs in Jenkins, the corresponding workspaces in the build slaves won't be deleted automatically. This Jenkins script will go to each slave and check if the jobs are already deleted in Jenkins master and delete the workspace.
import com.cloudbees.hudson.plugins.folder.Folder
import hudson.FilePath
import jenkins.model.Jenkins
def boolean isFolder(String name) {
def item = Jenkins.instance.getItemByFullName(name)
return item instanceof Folder
}
def deleteUnusedWorkspace(FilePath root, String path) {
#!/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)"
#!/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}}'
@md5
md5 / 00_README.md
Last active March 20, 2024 00:19
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .