Skip to content

Instantly share code, notes, and snippets.

View RandyMcMillan's full-sized avatar
🛰️
Those who know - do not speak of it.

@RandyMcMillan RandyMcMillan

🛰️
Those who know - do not speak of it.
View GitHub Profile
@hebasto
hebasto / alpine.md
Last active May 1, 2024 18:26
Building Bitcoin Core with GUI on Alpine Linux

Building Bitcoin Core with GUI on Alpine Linux

System

$ cat /etc/alpine-release
3.13.5

Bitcoin Core repository

@shirakaba
shirakaba / README.md
Last active July 1, 2025 08:31
GUI-based debugging of iOS/macOS Rust projects in Xcode

Here's how to get your environment set up to:

  1. Develop iOS and Android apps using Rust.
  2. Enable GUI debugging of Rust projects in Xcode.

If you just want to enable GUI debugging of macOS Rust projects in Xcode, I'm not actually sure whether you need cargo-mobile at all. But one benefit of installing it is that it automatically installs rust-xcode-plugin for you, giving you syntax highlighting of Rust sources in Xcode.

Prerequisites

cargo-mobile

@hebasto
hebasto / guix-sigs.md
Last active September 28, 2025 12:12
The `bitcoin-core/guix.sigs` Repository Workflow

The bitcoin-core/guix.sigs Repository Workflow

Common environment variables

export SIGNER="hebasto"
export GUIX_SIGS_REPO="/home/hebasto/dev/guix.sigs"
export DETACHED_SIGS_REPO="/home/hebasto/dev/bitcoin-detached-sigs"
@mutatrum
mutatrum / getbitcoinpdf.sh
Created January 21, 2021 16:15
Get bitcoin.pdf from the bitcoin blockchain in one line
bitcoin-cli getrawtransaction 54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713 | sed 's/0100000000000000/\n/g' | tail -n +2 | cut -c7-136,139-268,271-400 | tr -d '\n' | cut -c17-368600 | xxd -p -r > bitcoin.pdf
## NOTE ##
If you just need to build, and you don't need to hack on GTK 4 itself, you can
probably just use brew. That is the simplest and fastest way to get started.
```
brew install gtk4
```
At that point, /usr/local/bin/gtk4-demo is there, and all the others.
// Heavily based on ideas from https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_opt_fold.c
// The most fundamental deviation is that I eschew the big hash table and the lj_opt_fold()
// trampoline for direct tail calls. The biggest problem with a trampoline is that you lose
// the control flow context. Another problem is that there's too much short-term round-tripping
// of data through memory. It's also easier to do ad-hoc sharing between rules with my approach.
// From what I can tell, it also isn't possible to do general reassociation with LJ's fold engine
// since that requires non-tail recursion, so LJ does cases like (x + n1) + n2 => x + (n1 + n2)
// but not (x + n1) + (y + n2) => x + (y + (n1 + n2)) which is common in address generation. The
// code below has some not-so-obvious micro-optimizations for register passing and calling conventions,
// e.g. the unary_cse/binary_cse parameter order, the use of long fields in ValueRef.
@84adam
84adam / ssh_vim_bash_SETUP.md
Last active July 16, 2025 20:05
ssh_vim_bash_SETUP

no root ssh

  1. Create a new non-root user, follow the prompts: # adduser <new-username>
  2. Give sudo permissions to the new user: # usermod -aG sudo <new-username>
  3. Ensure that sudo is installed (which sudo ; if none, install it: apt install sudo)
  4. Check groups for new user: # groups <new-username>
  5. Edit sshd_config settings: # vim /etc/ssh/sshd_config
  6. Under "Authentication", change PermitRootLogin from yes to no: "PermitRootLogin no"
  7. (Optional) Change "MaxAuthTries" to a lower value to limit login attempts for any user: "MaxAuthTries 4"
  8. Save the changes: :wq (save and exit vim)
import SwiftUI
struct SplitView: View {
@State var selected: Int? = nil
var body: some View {
HStack {
List(0...10, id: \.self, selection: $selected) { number in
HStack {
@ih2502mk
ih2502mk / list.md
Last active December 4, 2025 17:08
Quantopian Lectures Saved