Skip to content

Instantly share code, notes, and snippets.

View agross's full-sized avatar
🔪
Sharpening the saw

Alexander Groß agross

🔪
Sharpening the saw
View GitHub Profile
@agross
agross / Dockerfile
Last active November 7, 2023 01:44
Synology DS2415+ docker 17.05 does not support --build-arg
FROM busybox
ARG FOO
RUN env && echo $FOO
function Import-Certificate
{
param
(
[IO.FileInfo] $CertFile = $(throw "Parameter -CertFile [System.IO.FileInfo] is required."),
[string[]] $StoreNames = $(throw "Parameter -StoreNames [System.String] is required."),
[switch] $LocalMachine,
[switch] $CurrentUser,
[string] $CertPassword,
[switch] $Verbose
#!/usr/bin/env sh
set -e
repositories=/var/lib/registry/docker/registry/v2/repositories/
printf 'Running Docker Registry garbage collection\n'
if ! docker container \
exec \
docker-registry_registry_1 \
; Make script persistent.
#Persistent
; Recommended for performance and compatibility with future AutoHotkey releases.
#NoEnv
; Recommended for new scripts due to its superior speed and reliability.
SendMode Input
#SingleInstance force
Menu Tray, Tip, Snippets
@agross
agross / backup-images.zsh
Last active October 12, 2019 01:04
Back up images, skip those having a DNG or RAW file in a "raw" subdirectory
#!/usr/bin/env zsh
set -eu
setopt pipe_fail
setopt extended_glob
mkdir -p images \
images/only-raw/raw \
images/only-jpeg \
images/jpeg-and-raw/raw \
version: '2.3'
services:
mariadb:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: secret
volumes:
- ./wp/mariadb/conf:/etc/mysql/conf.d:ro
- ./wp/mariadb/data:/var/lib/mysql
@agross
agross / command line runner.sh
Created May 17, 2019 08:56
TeamCity Command Line Runner script that supports both Windows (cmd) and *nix (sh)
:; if [ -z 0 ]; then
goto :windows
fi
# Linux script follows.
if [ ! -f .ruby-version ]; then
echo %ruby.version% > .ruby-version
fi
rbenv install --skip-existing && \
#!/usr/bin/env bash
# https://help.github.com/articles/about-git-subtree-merges/
set -euo pipefail
red='\e[1;31m'
green='\e[1;32m'
yellow='\e[1;33m'
reset='\e[0m'
# frozen_string_literal: true
require 'nanoc'
module Nanoc
module Filters
class SassWithCompass < Nanoc::Filter
identifier :sass_with_compass
type :text
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Name;Age;City
Peter;42;New York
Paul;57;London
Mary;35;Munich
Jaques;66;Paris
Yuri;23;Moscow
Stefanie;47;Stockholm
Nadia;29;Madrid