Skip to content

Instantly share code, notes, and snippets.

View bplaat's full-sized avatar

Bastiaan van der Plaat bplaat

View GitHub Profile
@bplaat
bplaat / events.rs
Created August 9, 2026 08:29
A Rust event handler test
use std::{
any::{Any, TypeId},
cell::RefCell,
collections::HashMap,
ops::{Deref, DerefMut},
rc::Rc,
};
// #######################
@bplaat
bplaat / $vscode-setup.md
Last active November 2, 2026 16:14
Bassie's VSCode config

VSCode Setup

@bplaat
bplaat / gh_clone.sh
Created March 5, 2026 17:21
GitHub clone script - clones all repos from an org or user
#!/bin/bash
# GitHub clone script - clones all repos from an org or user
# Usage: ./gh_clone.sh [github-org-or-user]
# If no argument provided, uses authenticated user
set -e
GITHUB_ORG="${1}"
@bplaat
bplaat / Dockerfile
Last active March 5, 2026 13:55
Wordpress with mysql-client docker container
FROM wordpress:latest
RUN apt-get update && \
apt-get install -y gnupg wget lsb-release && \
wget https://dev.mysql.com/get/mysql-apt-config_0.8.29-1_all.deb && \
DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.29-1_all.deb && \
apt-get update && \
apt-get install -y mysql-client && \
rm -rf /var/lib/apt/lists/* /mysql-apt-config_0.8.29-1_all.deb
@bplaat
bplaat / Cargo.toml
Last active December 11, 2025 10:08
Windows Rust Project with MSI installer example
[package]
name = "bassietest"
version = "0.1.0"
edition = "2024"
authors = ["Bastiaan van der Plaat <bastiaan.v.d.plaat@gmail.com>"]
[dependencies]
windows-sys = {version = "0.61.2", features = ["Win32_UI_WindowsAndMessaging"]}
@bplaat
bplaat / script.sh
Last active December 11, 2025 07:58
Script to extract folder from monorepo
# For macOS install git-filter-repo
brew install git-filter-repo
# Remove all git commits except touching 'bin/bible/' and 'bible/'
git filter-repo --path bin/bible/ --path bible/ --path-rename bin/bible/: --force
# Delete all inrelevant tags
git tag -l | grep -v '^bible' | xargs git tag -d
# Delete all branches except the current one
@bplaat
bplaat / korra-processor.md
Last active August 17, 2025 06:32
The Korra 32-bit Processor
@bplaat
bplaat / Cargo.toml
Created July 29, 2025 13:53
Small Rust binary example
[package]
name = "hello"
version = "0.1.0"
edition = "2024"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
[profile.release]
@bplaat
bplaat / $macos-setup.md
Last active November 9, 2026 12:04
macOS Setup

macOS Setup

  • Setup macOS
  • Setup displays, user avatar, appearance color and wallpaper
  • Keyboard key repeat time
  • Install homebrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Install essential casks