Skip to content

Instantly share code, notes, and snippets.

@maximko
maximko / genappkey.sh
Created April 17, 2024 14:38
Generate laravel APP_KEY one liner
docker run --rm -it laravelsail/php82-composer:latest bash -c "laravel new example-app --no-interaction && cd example-app && php ./artisan key:generate && cat .env | grep APP_KEY"
@maximko
maximko / borg-macos-backup.sh
Last active September 25, 2024 18:19
Backup macOS using borg and apfs snapshots
#!/usr/local/bin/bash
export BORG_REPO="ssh://user@server/borg-repo"
if [[ ! "${USER}" == "root" ]]; then
echo Start this script as root
exit 1
fi
echo === Present snapshots ===
@maximko
maximko / Dockerfile.drone-nolimit
Created April 21, 2022 10:09
Dockerfile to build drone ci with nolimit flag
# Build a container docker build -t drone-nolimit -f Dockerfile.drone-nolimit .
# Replace drone/drone image with drone-nolimit
ARG drone_version=v2.11.1
FROM docker:git AS clone
RUN git clone --recursive https://github.com/drone/drone.git && cd drone && git checkout $drone_version
FROM golang:1.14 AS build
COPY --from=clone /drone /drone
@maximko
maximko / rb6_xml_to_rb5_xml.py
Created September 29, 2021 13:04
Convert Rekordbox 6 XML to RB5 XML so you can import it to Rekordbox version 5
#!/usr/local/bin/python3
import xml.etree.ElementTree as ET
import sys
import os.path
next_TrackID = 1901
old_new = {}
filename = sys.argv[1]
@maximko
maximko / build-multiple-blackholes.sh
Created September 29, 2021 13:01
Build desired number of BlackHole drivers
#!/bin/bash
# copy everything from drivers/ folder to /Library/Audio/Plug-Ins/HAL/ and run
# sudo chown -R root:wheel /Library/Audio/Plug-Ins/HAL/Pipe*
# sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod
driver_num=1
build_driver_with_options() {
number=$(printf "%02d" ${1})