Skip to content

Instantly share code, notes, and snippets.

View Galadirith's full-sized avatar

Edward Fauchon-Jones Galadirith

View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 28, 2026 06:58
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@yuvve
yuvve / Obsidian Git-Mobile.md
Last active February 6, 2026 01:35
Automatically sync notes to and from git repository whenever you open and close Obsidian on mobile.

How to automatically sync Obsidian between Github and Android with Termux and Tasker

I use Obsidian git on PC, and this workaround (since the plugin doesn't support mobile) to seamlessly* sync my notes to and from my phone. Using these instructions you create an automation for pulling every time you open Obsidian, and pushing every time you close it.

* you can still get merge conflicts...

Preparation

  1. Install Tasker.
  2. Install Termux.
  3. Install Termux tasker plugin.
  4. Open Termux and write termux-setup-storage, give it permissions.
@Makeshift
Makeshift / tutorial.md
Last active February 14, 2026 15:26
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@hyperneutrino
hyperneutrino / english-words.txt
Created August 10, 2020 20:45
3000 common english words
a
abandon
ability
able
abortion
about
above
abroad
absence
absolute
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active February 26, 2026 21:47
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active February 27, 2026 08:08
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@DavidWells
DavidWells / aligning-images.md
Last active February 25, 2026 23:56
Guide to aligning images in github readme.md files. https://davidwells.io/snippets/how-to-align-images-in-markdown

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@mfuerstenau
mfuerstenau / zigzag-encoding.README
Last active September 1, 2025 13:16
ZigZag encoding/decoding explained
ZigZag-Encoding
---------------
Maps negative values to positive values while going back and
forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...)
(i >> bitlength-1) ^ (i << 1)
with "i" being the number to be encoded, "^" being
XOR-operation and ">>" would be arithemtic shifting-operation
@mbreese
mbreese / docker-heredoc-snippet
Last active July 9, 2025 05:06
Running docker with a HEREDOC to script the commands to run inside the container.
docker run -v /Users/mbreese/tmp:/tmp1 -w /tmp1 -i centos:7 /bin/bash -s <<EOF
date > foo
echo 'foo' >> foo
cat /etc/redhat-release >> foo
whoami >> foo
EOF
@mbauman
mbauman / MatlabClasses.ipynb
Last active March 17, 2025 19:36
Documenting how to parse Matlab's opaque class structure for MAT files with Julia.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.