Skip to content

Instantly share code, notes, and snippets.

View jasonm23's full-sized avatar

Jason Milkins jasonm23

View GitHub Profile
@jasonm23
jasonm23 / gopassbridge-dark-setup-windows.md
Last active October 31, 2024 02:43
GopassBridge-Dark For Firefox on Windows
@jasonm23
jasonm23 / how-to-run-passff-on-windows.md
Last active October 19, 2024 06:06
Running passff on Windows and Firefox

Hi all, Please consider donating to this or any of my many of opensource projects.

Buy Me a Coffee at ko-fi.com

How To run PassFF for Firefox on Windows

Getting it running on Windows is fairly simple, but the browser extension PassFF with its host script, PassFF host didn't work for me after running the installer install_host_app.bat file.

I found gopass which is a Go implementation of the original pass script, and seems to be 100% compatible.

@jasonm23
jasonm23 / open-key-system-harmonic-mixing.md
Last active October 4, 2024 11:58
OpenKey Harmonic Mixing System

How to Use OpenKey Harmonic Mixing Notation

Used by Native Instruments Traktor and other DJ/Music software (open alternative to Camelot, which is functionally equivalent to OpenKey)

  1. Key Labels: The notation uses a combination of a number and a letter. The number indicates the key's position in the circle (from 1 to 12), and the letter indicates the mode: m for minor and d for major. You can mix from Minor (openkey m, camelot B) to Major (openkey d, camelot A) and Major to Minor
@jasonm23
jasonm23 / emacs.desktop
Created April 25, 2024 02:50
Emacs desktop application launcher file
[Desktop Entry]
Name=Emacs
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient -a emacs -n \\"\\$@\\"; else exec emacs; fi" dummy %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
@jasonm23
jasonm23 / recreate-efi.md
Created February 27, 2024 09:03
Recreate /boot/efi/EFI after accidentally deleting the EFI partition
@jasonm23
jasonm23 / install emacs from source.sh
Last active March 11, 2024 08:22
Emacs v29 install from source on Ubuntu/Mint
sudo apt build-dep emacs
sudo apt install libgnutls28-dev \
libgtk-3-dev libwebkit2gtk-4.1-dev gnutls \
libgccjit0 libgccjit-10-dev libjansson4 libjansson-dev \
gnutls-bin libtree-sitter-dev gcc-10 imagemagick libmagick++-dev \
libwebp-dev webp libxft-dev libxft2
export CC=/usr/bin/gcc-10 && export CXX=/usr/bin/gcc-10 && ./autogen.sh && ./configure --with-native-compilation=aot && \
make -j$(proc) && /
@jasonm23
jasonm23 / learning-elixir.md
Last active September 8, 2023 13:26
Learning Elixir

Learning Elixir

Elixir is a versatile programming language known for its unique features and capabilities. Here are some key areas where Elixir truly shines:

  1. Concurrency and Parallelism: Elixir's concurrency model is based on lightweight processes that are isolated and can run concurrently. These processes communicate through message passing, allowing developers to build highly concurrent and scalable systems.

  2. Fault Tolerance: Elixir is built on the Erlang virtual machine (BEAM), which is known for its robust fault tolerance features. Processes can crash independently without affecting the overall system, thanks to supervision trees and supervisors that automatically restart failed processes.

  3. Scalability: Elixir's processes are lightweight, making it easy to scale applications horizontally. This scalability is crucial for building systems that can handle a large number of concurrent connections, such as web servers and real-time applications.

Left truncate on long pathnames in an llvm-cov HTML report.

Usage: $0 report_root_path source_starts_at_dir

For example the absolute, root path to a file.

/Long/pathname/that/eventually/gets/to/Source/app/module/something.ext

Will left truncate with a leading elipsis:

@jasonm23
jasonm23 / levenshtein-plain-english.md
Last active August 26, 2023 04:04
Levenshtein Distance Algorithm in plain english

Levenshtein Distance Algorithm in plain English

Inputs: Two strings s and t.

Goal: Calculate the minimum number of single-character edits (insertions, deletions, or substitutions) required to transform string s into string t.

  1. Initialize the Matrix:
    • Create a matrix dp with dimensions (len(s) + 1) x (len(t) + 1).
    • Initialize the first row with values 0 to len(t) and the first column with values 0 to len(s).
@jasonm23
jasonm23 / dijkstras-a-star-plain-english.md
Last active August 26, 2023 04:40
Dijkstra's A* Algorithm in plain english

Dijkstra's (A*) Algorithm in plain English

Inputs: A graph or grid where each node represents a location and has associated costs, and a start node and a goal node.

Goal: Find the shortest path from the start node to the goal node while considering the associated costs and heuristics.

  1. Initialize Open and Closed Sets:
    • Create an open set containing the start node. This set represents nodes to be evaluated.
    • Create an empty closed set. This set represents nodes that have already been evaluated.