Example docker compose file
version: "3"
services:
caddy:
build:
context: .
dockerfile: service/caddy/dockerfile
image: mojzu/dev-caddy:latest
Example docker compose file
version: "3"
services:
caddy:
build:
context: .
dockerfile: service/caddy/dockerfile
image: mojzu/dev-caddy:latest
#!/usr/local/bin/jq -cf | |
# This script transforms a JSON input containing a single array into the "JSON Lines" format (http://jsonlines.org) | |
# See https://stackoverflow.com/questions/42178636/how-to-use-jq-to-output-jsonl-one-independent-json-object-per-line | |
# | |
# Install: | |
# - save this file as "jsonl" | |
# - install jq (https://stedolan.github.io/jq/) | |
# - chmod u+rx jsonl | |
# |
#!/bin/sh | |
cmd=$1 | |
shift | |
# FIXME: it would be good for every argument to be wrapped in quotes | |
echo run $@ | gdb "$cmd" -x strace.gdb &> gdb-strace-log |
///$(which true);FLAGS="-g -Wall -Wextra --std=c17 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $FLAGS "$THIS_FILE" -o "$OUT_FILE" || exit $?;exec bash -c "exec -a \"$0\" \"$OUT_FILE\" $([ $# -eq 0 ] || printf ' "%s"' "$@")" | |
#include <stdio.h> | |
int main() { | |
printf("Hello world!\n"); | |
return 0; | |
} |
This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.
I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/
in my Dockerfiles, and also work from
isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/
.
At the end of the day, vendoring (and committing vendor/
) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:
Aliases for .bashrc to find Raspberry. Note: MAC addresses of adaptors are there | |
alias find-pi-wifi="sudo nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=\$NF}/00:E0:4D/{print ip}'" | |
alias find-pi="sudo nmap -sP 10.50.0.0/24 | awk '/^Nmap/{ip=\$NF}/B8:27:EB/{print ip}'" |
<# | |
.DESCRIPTION | |
Copies the Windows Spotlight lock screen images in Windows 10 to a "Windows Spotlight" folder in My Pictures. | |
This script will intelligently sort through the temporary directory and will only copy images | |
that are 1920x1080. Since the filenames of the images can change, the script will also compare | |
SHA1 hashes of the existing so we don't copy duplicates. | |
.NOTES | |
Version: 1.0.2 |
#!/usr/bin/env perl | |
# Copyright 2015 by David Golden | |
# Licensed under CC0 https://creativecommons.org/publicdomain/zero/1.0/ | |
# Updated 2016-03-01: | |
# - more variation in organzations selected; you will want to customize this yourself | |
# - splits out wishlists differently/correctly | |
# - reports only PRs unless --all is specified | |
use v5.10; | |
use strict; | |
use warnings; |
If you're like me and you use semver for versioning your tags, you probably hate when you do this:
$ git tag -l
0.1.0
0.10.0
0.2.0
0.3.0
0.3.1
0.4.0
0.5.0
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
sub dep(@) { Dep->new( name => @_ ) } | |
## Archive::Tar ------ | |
dep 'GSAR/Archive-Tar-0.071.tar.gz' => provides => { 'Archive::Tar' => '0.071', }; | |
dep 'SRZ/Archive-Tar-0.22.tar.gz' => provides => { 'Archive::Tar' => '0.22', }; |