docker network create jenkins
docker run \
--detach \
--rm \
--net=jenkins \
--volume=jenkins_home:/var/jenkins_home:rw \
--volume=/var/run/docker.sock:/var/run/docker.sock:rw \
--publish=8080:8080 \
--env=JAVA_OPTS=-DexecutableWar.jetty.sessionIdCookieName=dockerjenkins \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Usage: ./run.bash $(sort --random-sort /usr/share/dict/words| head -n10 ) | tee /tmp/foo.html | |
set -euo pipefail | |
function string_to_color_hex { | |
local -r string="$1" | |
local -r hash=$(echo -n "$string" | md5sum | cut -d' ' -f1) | |
local -ir r=$((16#${hash:0:2})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module gist.github.com/e3b13265d24471651e02f7d7a42e7d2c | |
go 1.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
tempdir='' | |
setup() { | |
tempdir="$(mktemp -d)" | |
cd "$tempdir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
set -eu | |
cd "${0:h}" | |
die() { | |
echo "death: $*" >&2 | |
exit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: hello hello-asm | |
hello-asm.s: hello.c | |
clang -S -masm=intel -o $@ $< | |
%: %.s | |
clang -o $@ $< | |
%: %.o | |
clang -o $@ $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <errno.h> | |
#include <libproc.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// Works on macOS using libproc. | |
int main(int argc, char *argv[]) { | |
int ret; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:1-experimental | |
FROM alpine:3 AS fetcher | |
# We don't care about minimizing the number layers for this image. | |
RUN apk add --no-cache curl ca-certificates | |
WORKDIR /files | |
RUN curl -sSLf -o chronic https://github.com/docwhat/chronic/releases/download/v1.0.11/chronic_linux_amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Canvas Asteroids</title> | |
<style> | |
* { | |
margin: 0; | |
} | |
canvas { |
NewerOlder