Skip to content

Instantly share code, notes, and snippets.

@vszakats
vszakats / mk-relnotes.sh
Last active April 4, 2024 09:41
libssh2 RELEASE-NOTES helper
#!/usr/bin/env bash
# Copyright (C) Viktor Szakats
# SPDX-License-Identifier: BSD-3-Clause
# 1. $ git format-patch "$(git describe --abbrev=0)"
# 2. Move low-impact commits to a subdirectory (e.g. 'unused')
# 3. Edit subjects as needed, add module prefix, fix typos, add backtick quotes, fix casing, shorten
# 4. Fixup author names, casing, add 'on github', fixup non-standard markup
# 5. Run this script
# 6. Delete changes with `-LOCAL` references as needed
@vszakats
vszakats / apple-notes-export-from-json.py
Last active May 10, 2023 12:39
Apple Notes.app JSON to Markdown/HTML converter
#!/usr/bin/env python3
# Copyright 2022-present Viktor Szakats. The MIT License.
# SPDX-License-Identifier: MIT
# Convert 'apple_cloud_notes_parser'-made JSON into Markdown or HTML.
# The goal is to export the content losslessly and with the ability to
# continue editing them after importing or opening them in Markdown
# editors as-is.
@vszakats
vszakats / apple-notes-export.js
Last active December 10, 2022 19:41
Export Apple Notes to HTML (with formatting/pics)
#!/usr/bin/env osascript
// Export all Apple Notes.app notes to the current directory, each note
// into a HTML file that includes formatting and embedded documents, with
// creation/modification timestamps set according to Notes metadata.
// To the extent possible under law, Viktor Szakats
// has waived all copyright and related or neighboring rights to this
// script.
// CC0 - https://creativecommons.org/publicdomain/zero/1.0/
@vszakats
vszakats / codesign.sh
Last active April 21, 2024 18:19
Code-signing PE executables using OpenSSL, osslsigncode (and more)
#!/bin/sh
# To the extent possible under law, Viktor Szakats
# has waived all copyright and related or neighboring rights to this
# script.
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/
# SPDX-License-Identifier: CC0-1.0
# This script will create a self-signed root certificate, along with a code
# signing certificate in various formats, trying to use the best available
@vszakats
vszakats / s3-upload-aws4.sh
Last active February 29, 2024 14:23
AWS S3 upload using signature v4
#!/bin/sh
# To the extent possible under law, Viktor Szakats
# has waived all copyright and related or neighboring rights to this
# script.
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/
# SPDX-License-Identifier: CC0-1.0
# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,