Skip to content

Instantly share code, notes, and snippets.

View mrcnski's full-sized avatar

Marcin S. mrcnski

View GitHub Profile
@mrcnski
mrcnski / git-unsigned
Last active March 31, 2023 10:24
Enforce Signing Policy for Repo
#!/usr/bin/python3
#
# For a given repo, checks that:
# - All commits are signed.
# - All signatures belong to a set of approved keys.
import subprocess
LAST_GOOD_HASH = "b80220a"
APPROVED_KEYS = {
@mrcnski
mrcnski / skynet-js.hns.html
Created July 7, 2021 17:30
Dynamically load SDK from skynet-js.hns
<script type="text/javascript">
fetch(document.location.href, { method: "HEAD" })
.then(resp => {
const portal = resp.headers.get("skynet-portal-api");
const _loadScript = function(path) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = path;
var callback = function () {
@mrcnski
mrcnski / clean_history.sh
Last active January 17, 2024 18:13
Clean Bash History
#!/bin/bash
#
# Cleans up garbage lines and duplicate entries.
#
# DEPENDENCIES:
#
# - rg: cargo install ripgrep
# - unique: go install github.com/ro-tex/unique@latest
# - sponge: brew install moreutils
#
@mrcnski
mrcnski / b
Created November 14, 2024 22:59
Bible Verse Fetcher
#!/Users/marcin/Sync/Home/dotfiles/bin/.env/bin/python3
# Bible verse fetcher. Put this script in your PATH, update the above path to
# python, and make it executable.
#
# Usage: b <verses> [optional flags]
#
# Example: b John 3:16-17
# Example: b John 3:16-17 --version NIV
#