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
@shirakaba
shirakaba / README.md
Last active March 27, 2025 15:25
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 March 13, 2025 08:24
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"
## 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.
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 May 9, 2025 18:27
Quantopian Lectures Saved
@ShaoJenChen
ShaoJenChen / gist:8ae9728939061ed4a3d4a63d01f7d404
Last active November 2, 2022 19:44 — forked from adamgit/gist:3705459
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
##########################################
#
# c.f. https://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.82
#
# Latest Change:
# - MORE tweaks to get the iOS 10+ and 9- working
# - Support iOS 10+
# - Corrected typo for iOS 1-10+ (thanks @stuikomma)
@surpher
surpher / rust_to_swift.md
Last active April 11, 2025 03:03
Building binaries from Rust to iOS/macOS (PactSwift specific)
@jleo84
jleo84 / key_converter.py
Created September 2, 2020 01:45
Convert any Bitcoin key prefix to another (e.g.: xpub to ypub, zpriv to Zpriv)
import hashlib
import base58
import sys
prefix_dict = {
"xprv": "0488ade4", # Mainnet - P2PKH or P2SH - m/44'/0'
"yprv": "049d7878", # Mainnet - P2WPKH in P2SH - m/49'/0'
"zprv": "04b2430c", # Mainnet - P2WPKH - m/84'/0'
"Yprv": "0295b005", # Mainnet - Multi-signature P2WSH in P2SH
"Zprv": "02aa7a99", # Mainnet - Multi-signature P2WSH
@mig-hub
mig-hub / Static_Website.mk
Last active September 27, 2024 22:49
Makefile for generating a static website
SRC_DIR = src
DST_DIR = build
CSS_DIR = $(DST_DIR)/css
SCSS_DIR = $(SRC_DIR)/scss
SCSS_INCLUDES_DIR = $(SCSS_DIR)/includes
SCSS_FILES = $(wildcard $(SCSS_DIR)/*.scss)
CSS_FILES=$(patsubst $(SCSS_DIR)/%.scss, $(CSS_DIR)/%.css, $(SCSS_FILES))