I use a GPG key to sign my git commits.
An error like this one might be a sign of an expired GPG key.
error: gpg failed to sign the data fatal: failed to write commit object
#!/bin/bash | |
# Check if the remote 'origin' has a 'main' branch | |
if git show-branch remotes/origin/main > /dev/null 2>&1; then | |
echo "main" | |
else | |
echo "master" | |
fi | |
git rev-list --no-merges "${1:-HEAD}" | while read rev; do echo "$(git show -s --format='%b' $rev | wc -w) words: $rev"; done | sort -rn | head -6 | cut -f2 -d: | xargs -I{} git rev-list --pretty=medium {} --max-count=1 |
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
import UIKit | |
// known-good: Xcode 8.2.1 | |
/** | |
UIImageView subclass which works with Auto Layout to try | |
to maintain the same aspect ratio as the image it displays. | |
This is unlike the usual behavior of UIImageView, where the |
localeIdentifier | Description | |
---|---|---|
eu | Basque | |
hr_BA | Croatian (Bosnia & Herzegovina) | |
en_CM | English (Cameroon) | |
rw_RW | Kinyarwanda (Rwanda) | |
en_SZ | English (Swaziland) | |
tk_Latn | Turkmen (Latin) | |
he_IL | Hebrew (Israel) | |
ar | Arabic | |
uz_Arab | Uzbek (Arabic) |
struct Regex { | |
let pattern: String | |
let options: NSRegularExpressionOptions | |
private var matcher: NSRegularExpression { | |
return try! NSRegularExpression(pattern: pattern, options: options) | |
} | |
init(pattern: String, options: NSRegularExpressionOptions! = nil) | |
{ |