Skip to content

Instantly share code, notes, and snippets.

View medul6's full-sized avatar

Michael Heck medul6

  • Stolz-Krechting Produktionsbüro Medien
  • Lahr/Schwarzwald
View GitHub Profile
@fabiolimace
fabiolimace / UUIDv7_SQLITE_VIEW.sql
Last active June 26, 2025 09:07
UUIDv7 for SQLite using view and triggers
DROP VIEW IF EXISTS uuid7;
CREATE VIEW uuid7 AS
WITH unixtime AS (
SELECT CAST((STRFTIME('%s') * 1000) + ((STRFTIME('%f') * 1000) % 1000) AS INTEGER) AS time
-- SELECT CAST((UNIXEPOCH('subsec') * 1000) AS INTEGER) AS time -- for SQLite v3.38.0 (2022)
)
SELECT PRINTF('%08x-%04x-%04x-%04x-%012x',
(select time from unixtime) >> 16,
(select time from unixtime) & 0xffff,
ABS(RANDOM()) % 0x0fff + 0x7000,
@christyxgeorge
christyxgeorge / yt-transcribe.py
Created September 23, 2023 07:19
Transcribe youtube video on an Intel Mac
"""Script to run whisper on youtube video"""
## Transcribe Andrej Karpathy's video on Making GPT
## Whisper.cpp on Intel Mac takes almost an hour and a half to transcribe the 1 hr 56 min video
# Install pre-reqs:
# !pip install git+https://github.com/openai/whisper.git
# !pip install pytube
import pytube as pt
@kconner
kconner / macOS Internals.md
Last active October 21, 2025 15:03
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

(venv) # Exit:0 2023-03-12 16:59:27 [r2q2@Reformer#[:~/opt/llama.cpp]
$(: !605 ) ./main -m ./models/65B/ggml-model-q4_0.bin -t 8 -n 128
main: seed = 1678658429
llama_model_load: loading model from './models/65B/ggml-model-q4_0.bin' - please wait ...
llama_model_load: n_vocab = 32000
llama_model_load: n_ctx = 512
llama_model_load: n_embd = 8192
llama_model_load: n_mult = 256
llama_model_load: n_head = 64
llama_model_load: n_layer = 80
@santaklouse
santaklouse / CrossOver.sh
Last active October 21, 2025 14:40
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@ctsrc
ctsrc / README.md
Last active October 9, 2025 20:37 — forked from niw/README.en.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
@vyach-vasiliev
vyach-vasiliev / Extract3D_from_PDF__ReadMe.md
Created August 13, 2020 13:53
Extract 3D objects from PDFs

This instruction is about how to get a 3D model out of a PDF file.

We need:

  • Python version not lower than 2.7
  • Any version OS (Windows, Linux, Mac)

Extract

Download the Pythong PDF Parser: https://blog.didierstevens.com/programs/pdf-tools/

  1. Search for the 3D object:

Typesetting Libraries and Plugins

These are tools that improve typographic details like microtypography and typographic syntax automatically.

Additions welcome!

Name Language/Platform
Detergent JavaScript (ESM)
JoliTypo PHP
@Shourai
Shourai / Mount SD Cards within VirtualBox on Mac OS X
Created November 2, 2018 11:00
Mount SD Cards within VirtualBox on Mac OS X
From: https://blog.lobraun.de/2015/06/06/mount-sd-cards-within-virtualbox-on-mac-os-x/
Mount SD Cards within VirtualBox on Mac OS X
Sometimes you need to mount your SD cards inside a VirtualBox machine to work with the files on the card. Working with the Raspberry Pi SD card on Mac OS X is an example for this.
My Raspberry Pi runs on Linux with some version of the EXT file system. While there is some support for this on Mac OS X, the available solutions have a lot of limitations, especially when it comes to write support on EXT file systems. As I do not have an USB keyboard, I sometimes need to mount the filesystem on another system to fix a startup problem when some of my experiments go wrong.
VirtualBox in theory allows for passing the internal card reader of the MacBooks to the virtual machine. Unfortunately, this does not work for me (and it seems for many other people).
@gagarine
gagarine / fish_install.md
Last active September 19, 2025 20:00
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish