Skip to content

Instantly share code, notes, and snippets.

View gubatron's full-sized avatar

Angel Leon gubatron

View GitHub Profile
@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 15, 2025 16:19
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@gubatron
gubatron / ssh-git-signing.md
Last active April 11, 2025 15:22
Signing github commits with your SSH key

GPG gives a lot of shit on macos for some reason.

It's best to just add the same SSH authentication key you have on github as a "Signing Key"

$ git config [--global] gpg.format ssh
$ git config [--global] user.signingkey ~/.ssh/id_rsa.pub
$ git config [--global] commit.gpgsign true
@gubatron
gubatron / Makefile
Last active February 16, 2025 12:31
Makefile for rust projects
# Makefile
.PHONY: build release clean fmt check test install doc help tasks
default: help
# Default target (ensures formatting before building)
build: fmt ## Build the project in release mode (runs fmt first)
cargo build --release
@gubatron
gubatron / A National Singularity Fund for High Universal Income: Redefining Work, Empowering Passions, and Embracing a Post-Labor Future.md
Last active January 21, 2025 02:29
A National Singularity Fund for High Universal Income: Redefining Work, Empowering Passions, and Embracing a Post-Labor Future

A National Singularity Fund for High Universal Income:

Redefining Work, Empowering Passions and Embracing a Post Labor Future

Introduction

As Artificial General Intelligence (AGI) surpasses human-level cognition and super-dexterous robots automate vast swaths of manual and knowledge-intensive work, billions of people risk losing their traditional jobs. This scenario is often painted in stark terms—one of displacement, unemployment, and fear. Yet, a deeper truth lies in the fact that a future of abundant automation can liberate society from rote or uninspiring labor, allowing individuals to pursue creativity, innovation, personal growth, and genuine passions.

To prevent social unrest and ensure equitable benefits, we propose a National Singularity Fund (NSF). The NSF collects and manages revenue from automation taxes, equity grants, and targeted investments in exponential technologies (AGI, quantum computing, fusion energy). By distributing High Universal Income (HUI) to

@gubatron
gubatron / dht-walkthrough.md
Last active November 5, 2024 18:35
DHT walkthrough notes

DHT Walkthrough Notes

I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.

What problem does this solve?

400,000,000,000 (400 billion stars), that's a 4 followed by 11 zeros. The number of atoms in the universe is estimated to be around 10^82. A DHT with keys of 160 bits, can have 2^160 possible numbers, which is around 10^48

@gubatron
gubatron / RAG Frameworks.md
Created November 1, 2024 19:41
RAG Frameworks comparison
Framework Description Key Features Language Support Integration Capabilities Deployment Options License
RaLLe A framework for developing and optimizing retrieval-augmented large language models (R-LLMs) for knowledge-intensive tasks. - Development and evaluation of R-LLMs
- Optimization tools for knowledge-intensive applications
Python - Compatible with various LLMs
- Supports integration with external knowledge bases
Local and cloud deployment MIT License
BERGEN A benchmarking library that standardizes experiments and provides tools for evaluating RAG pipelines. - Standardized benchmarking
- Comprehensive evaluation tools
- Support for various RAG components
Python - Integrates with multiple retrieval and generation models Local deployment Apache 2.0 License
RAGFlow An open-source RAG engine based on deep document un
@gubatron
gubatron / Building-libbittcoin-network-on-macos-arm64.md
Last active October 23, 2024 00:04
Building libbitcoin-network on macos with arm64 chip, clang 16

Building libbitcoin-network on macos arm64

$ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ uname -a
@gubatron
gubatron / Entitlements.plist
Last active October 16, 2024 02:00
An example Entitlements.plist file to allow a desktop app to run a Java Runtime Environment on a signed .app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
@gubatron
gubatron / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Last active October 12, 2024 22:57
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@gubatron
gubatron / delete_github_workflow_run_logs.sh
Last active October 12, 2024 22:06
Batch delete 30 Github Workflow Run Logs using the github command line tool
#
# This script uses the github command line tool
# to delete the last 30 logs from your repository's workflow runs
#
# Requirements
#
# gh - github command line (brew install gh)
# you will need a GH_TOKEN, create it here: https://github.com/settings/tokens
#
# once you've created the personal access token with permission to manage your workflows