Skip to content

Instantly share code, notes, and snippets.

@jun-sheaf
jun-sheaf / install_rustup.sh
Last active September 20, 2023 05:37
Installs rustup as a system-wide toolchain manager
#!/bin/zsh
# Rustup doesn't have an easy "system-wide" approach to installation since it
# requires $CARGO_HOME for locating the binary folder. Here, we define
# `system-wide` as requiring `sudo-only` permission, i.e. `rustup install
# toolchain ...` breaks without `sudo`.
#
# The trick is thus to somehow "envelope" Rustup in another script so that it
# uses a "system-wide" cargo home instead of the default one whenever it's
# called.
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active April 24, 2024 16:08
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@rygorous
rygorous / gist:4172889
Created November 30, 2012 00:28
SSE/AVX matrix multiply
#include <immintrin.h>
#include <intrin.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
union Mat44 {
float m[4][4];
__m128 row[4];
};