Skip to content

Instantly share code, notes, and snippets.

View miraculixx's full-sized avatar
💭
working on https://github.com/omegaml

miraculixx

💭
working on https://github.com/omegaml
  • Switzerland
View GitHub Profile
@miraculixx
miraculixx / copyjs.sh
Created April 29, 2026 12:42
copyjs.sh - copy distribution files from node_modules
#!/bin/bash
# copy-dist-deps.sh - Pure bash dist file copier
# using perplexity.ai
# I wrote this because there is no good solutio as of 2026(sic!)
# to simply install packages and then extract just the files you
# actually need in production
#
# ref. https://www.perplexity.ai/search/a7ed838d-9bd5-4f5f-9e77-8d1456d86473#22
@miraculixx
miraculixx / setup-miniforge.sh
Created April 22, 2026 09:21
miniforge setup - downoad a specific version and verify against a known hash to avoid supply chain intrusion
#!/bin/bash
## package
##
## Initialize a local deployment
## @script.name [option]
##
## Options:
##
set -e
# script setup to parse options
https://www.perplexity.ai/search/gute-fragen-auf-deutsch-die-ei-hUsL1FejR1ORZIpQpW4lpQ
@miraculixx
miraculixx / fixedjson.py
Created May 21, 2025 21:29
fix cpython json encoding of nan
# this is a hack to fix https://github.com/python/cpython/issues/70293
from json import JSONEncoder
class FixedNaNJSONEncoder(JSONEncoder):
def iterencode(self, o, _one_shot=False):
# fix cpython json encoding of nan values
# see https://github.com/python/cpython/issues/98306
# this overrides JSON.enconder.iterencode by trading performance for correctness
markers = {}
_encoder = encode_basestring
@miraculixx
miraculixx / custom.css
Created April 19, 2025 14:31
anytype custom.css
/* https://doc.anytype.io/anytype-docs/advanced/feature-list-by-platform/custom-css */
/* underline markup links */
a.markuplink {
text-decoration-line: underline;
}
/* nicer colors for selected text */
.isSelectionSelected {
background-color: #3399ff; /* Light blue background */
@miraculixx
miraculixx / pytry
Created November 19, 2024 07:26
try a python package in its own venv
#!/bin/bash
function setup() {
python -m venv .pytry
source .pytry/bin/activate
pip install $packages
}
function tryimport() {
toimport=$1
@miraculixx
miraculixx / LICENSE
Last active November 7, 2024 23:45
ML drift statistics calculator and plots
Copyright (c) 2024 miraculixx
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
@miraculixx
miraculixx / LICENSE
Last active June 8, 2024 15:10
mount multiple longhorn replicas from a single command
MIT NON-AI License
Copyright (c) 2024, miraculixx
Permission is hereby granted, free of charge, to any person obtaining a copy of the software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@miraculixx
miraculixx / util.py
Created April 5, 2024 10:27
drop-in replacmement for time.sleep (python)
def wait(s, delay=1):
"""
drop-in for time.sleep() with status updates and Ctrl-C support
Usage:
for delay in wait(seconds):
print(f'waiting for {delay} seconds')
"""
import time
@miraculixx
miraculixx / LICENSE.md
Last active February 27, 2024 22:50
Python Plotting Interaktive Beispiel

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit