Skip to content

Instantly share code, notes, and snippets.

View xixiaofinland's full-sized avatar
:octocat:

Xi Xiao xixiaofinland

:octocat:
View GitHub Profile
@Mefistophell
Mefistophell / RUST.MD
Last active June 7, 2025 16:41
How to Compile a Rust Program on Mac for Windows

Question: I want to compile my Rust source code for the Windows platform but I use macOS.

Solution:

  1. Install target mingw-w64: brew install mingw-w64
  2. Add target to rustup: rustup target add x86_64-pc-windows-gnu
  3. Create .cargo/config
  4. Add the instructions below to .cargo/config
[target.x86_64-pc-windows-gnu]
@LukeMathWalker
LukeMathWalker / audit.yml
Last active August 20, 2025 05:46
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@hroi
hroi / fish_jj_prompt.fish
Last active August 21, 2025 00:29
Jujutsu (jj) prompt for fish-shell
# Place me in ~/.config/fish/functions
# Then add me to `fish_vcs_prompt`: `funced fish_vcs_prompt` and save it to
# your personal config: `funcsave fish_vcs_prompt;`
function fish_jj_prompt --description 'Write out the jj prompt'
# Is jj installed?
if not command -sq jj
return 1
end