I hereby claim:
- I am mafredri on github.
- I am mafredri (https://keybase.io/mafredri) on keybase.
- I have a public key ASAcL0fP34_ZPvJ6-aV3RbVAF8TYNpudE2uPwkxbOw2KIgo
To claim this, I am signing this object:
#!/usr/bin/env zsh | |
if (( ! ${#@} )); then | |
print "Convert mp3 to m4r (Apple Tone)" | |
print "Usage: $0 file1.mp3 file2.mp3" | |
exit 1 | |
fi | |
tmpdir=$(mktemp -d) |
I hereby claim:
To claim this, I am signing this object:
javascript:(function(){window.location='https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&edit-text=&u='+encodeURIComponent(window.location.href)})();void(0); |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
"github.com/mafredri/cdp" |
#!/usr/bin/env zsh | |
# gpg-yubikey-sign | |
# | |
# This script lets you use any of your unexpired subkeys connected to | |
# your public key (0xDEADBEEFCAFEBAAD) to sign git commits. It will also | |
# display "Waiting for YubiKey touch..." to remind you that an action is | |
# required. | |
# | |
# Add this script to your PATH and configure git to use it for gpg | |
# signing. |
// This example gives permission to access geolocation | |
// and fetches the current position via JavaScript. | |
// Tested on: cdp v0.18.7 and Chrome Canary 70.0.3532.0, | |
// and seems to work in both headless and headfull mode. | |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" |
#!/usr/bin/env expect -f | |
# Description: Expect script to automate WireGuard upgrade on UniFi Security Gateway | |
# Author: Mathias Fredriksson <mafredri@gmail.com> | |
# This script assumes non-interactive ssh login. | |
# Usage upgrade.expect <[user@]usg> <https://github.com/Lochnair/vyatta-wireguard/releases/download/${RELEASE}/wireguard-${BOARD}-${RELEASE}.deb> | |
set timeout 60 |
#!/bin/bash | |
# brew-go-get | |
# Original: https://blog.filippo.io/cleaning-up-my-gopath-with-homebrew/ | |
set -euo pipefail | |
name_to_repo() { | |
local name="$1" | |
name="${name/go-get-}" | |
echo "${name//--//}" |
FROM alpine:3.14.2 | |
LABEL maintainer="Mathias Fredriksson <mafredri@gmail.com>" | |
RUN apk add --no-cache \ | |
bzip2 \ | |
ca-certificates | |
ARG RESTIC_VERSION='0.12.1' | |
RUN wget -O - https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_amd64.bz2 \ | |
| bzip2 -d >/usr/local/bin/restic \ |