-
Create remote repo (suffix .git is convention for bare repos)
git init --bare myrepo.git
-
Add docker build hook
cp post-receive.bash myrepo/hooks/post-receive
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 | |
# NetworkManager dispatcher script for /etc/NetworkManager/dispatcher.d/ | |
# Turn off wifi only while ethernet has connection. Adapted from manpage. | |
# mnl@vandal.nu 2023 | |
ethernet_connected() { | |
# Check if any ethernet connections are up | |
nmcli --terse --fields type,state device | while read -r | |
do | |
[ "${REPLY}" = ethernet:connected ] && return |
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
FROM registry.access.redhat.com/ubi9/python-39 | |
COPY ./src /opt/app-root | |
RUN source ../bin/activate && \ | |
pip3 install -r ../requirements.txt | |
EXPOSE 8000 | |
USER 1000 |
$argon2id$v=19$m=64,t=512,p=2$O+ZS3ATKcY+llIQmxxiMRA$KIc7L2CRiJ6G+tQ9K4shCA
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 | |
# Install, start and enable Prometheus Node Exporter | |
# on a OpenWRT system. Does not check for space! | |
# Overwrites any existing versions. Changing release before running should | |
# be enough to update node_exporter version. | |
set -e | |
# node_exporter release version | |
release="1.5.0" |
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 | |
# shellcheck disable=SC2086,SC2064 | |
# vim: set ts=2 sw=2 tw=0 noet : | |
# Take screenshots, apply gaussian blur, lock screen | |
# grim -> blur -> swaylock | |
readonly GRIM=/usr/bin/grim | |
readonly BLUR="$HOME/bin/blur" | |
set -Eueo pipefail |
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 | |
wait_for_mounts() { | |
local timestamp=$(date -d 1min +%s) | |
timeleft() { | |
[[ $(date +%s) -lt $timestamp ]] && return 0 | |
return 1 # Timeout, $timestamp passed | |
} | |
activating_mounts() { | |
# Get list of units |
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 | |
# Adapted from https://unix.stackexchange.com/a/311680/81195 | |
# I added tput, fuser and cleanup | |
if [[ $# -lt 1 ]]; then | |
echo "Usage:" | |
echo " femtocom <serial-port> [ <speed> [ <stty-options> ... ] ]" | |
echo " Example: $0 /dev/ttyS0 9600" | |
echo " Press Ctrl+Q to quit" | |
fi |
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
" Vim indent file | |
" Language: Yaml | |
" Author: Ian Young | |
" Get it bundled for pathogen: https://github.com/avakhov/vim-yaml | |
if exists("b:did_indent") | |
finish | |
endif | |
"runtime! indent/ruby.vim | |
"unlet! b:did_indent |
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
location /resize { | |
alias /tmp/nginx/resize; | |
set $width 150; | |
set $height 100; | |
set $dimens ""; | |
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
set $width $1; | |
set $height $2; | |
set $image_path $3; |
NewerOlder