Skip to content

Instantly share code, notes, and snippets.

View mattico's full-sized avatar
🦀
Embedded Rust

Matt Ickstadt mattico

🦀
Embedded Rust
  • Beck Enterprises
View GitHub Profile
@mattico
mattico / check_zpool_errors.py
Last active November 15, 2023 16:57
Script for monitoring zpool errors
#!/usr/bin/env python3
import subprocess
import os
import csv
import re
from collections import defaultdict
from datetime import timedelta
STATUS_CMD = ["zpool", "status", "-v"]
@mattico
mattico / settings.json
Created November 23, 2021 16:58
Windows Terminal VS Preview Developer Shells
{
"guid": "{a5a223a2-0e3d-4a47-81f7-f3c0a78ed2b2}",
"name": "Developer PowerShell for VS 2019 Preview",
"commandline": "powershell.exe -noe -c \"&{$vsPath = &(Join-Path ${env:ProgramFiles(x86)} '\\Microsoft Visual Studio\\Installer\\vswhere.exe') -prerelease -version '[16.0,17.0)' -property installationpath; Import-Module (Join-Path $vsPath 'Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll'); Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation}\"",
"icon": "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\Assets\\VisualStudio.70x70.contrast-standard_scale-180.png"
},
{
"guid": "{981d3411-61af-44fd-84b9-18892e9c880c}",
"name": "Developer Command Prompt for VS 2019 Preview",
"commandline": "%comspec% /k \"%ProgramFiles(x86)%\\Microsoft Visual Studio\\2019\\Preview\\Common7\\Tools\\VsDevCmd.bat\"",
@mattico
mattico / channel.rs
Created October 28, 2021 15:30
An example Multi-RTT Logger implementation for knurling-rs/defmt
use core::{
ptr,
sync::atomic::{AtomicUsize, Ordering},
};
// Split the 512KiB AXI SRAM for the lower 16 regular priorities.
pub const LARGE_SIZE: usize = 512 * 1024 / 16;
// Use smaller buffers for NMI/HardFault, which aren't likely to be used.
pub const SMALL_SIZE: usize = 512;
--- ./mmaps_old/stm32h743.mmap 2021-06-06 20:39:56.330000000 -0500
+++ mmaps_new/stm32h743.mmap 2021-06-06 20:39:04.720000000 -0500
@@ -21366,48 +21366,48 @@
0x58027054 B REGISTER M2FECR (rw): RAMECC monitor 2 failing error code register
0x58027054 C FIELD 00w32 FEC (ro): ECC failing code
0x5C001000 A PERIPHERAL DBGMCU
-0x5C001000 B REGISTER IDC (ro): Identity code
+0x5C001000 B REGISTER IDC (ro): DBGMCU Identity Code Register
0x5C001000 C FIELD 00w12 DEV_ID: Device ID
-0x5C001000 C FIELD 16w16 REV_ID: Revision ID
@mattico
mattico / stacktrace1.txt
Created March 1, 2018 17:18
VSCode zombie process stacktraces
# The main thread of this dump wan't in a node or windows dll, so I couldn't get symbols for it.
# The other threads looked just like the other examples.
# The main thread of this process wansn't in a windows or node dll when the dump was taken, so I don't have any symbols.
# The other threads look the same as the other processes.
0x3e5d5e6199f
0x2c7ea7d5fe9
0x2c7ea7d5fa9
0x1f2e460c599
@mattico
mattico / output.txt
Created February 3, 2018 17:27
Go OneDrive symlink test
λ ls D:\OneDrive
'Application Files' AudioBooks Books desktop.ini Documents 'Email attachments' Music OnDemandTest Pictures Public Videos
λ go run test.go
2018/02/03 11:25:53 D:\OneDrive
2018/02/03 11:25:53 Lr--r--r--
@mattico
mattico / sloc.txt
Created March 25, 2017 18:39
Sloccount for Firefox 52.0esr
# Generated using Tokei
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks
-------------------------------------------------------------------------------
Ada 11 2861 1697 560 604
Assembly 460 235160 191844 13520 29796
Autoconf 230 41624 30323 6768 4533
BASH 3 192 143 23 26
Batch 43 3847 3234 103 510
C 3418 2282932 1687618 326666 268648
time: 0.053; rss: 0MB parsing
time: 0.000; rss: 0MB recursion limit
time: 0.000; rss: 0MB crate injection
time: 0.000; rss: 0MB plugin loading
time: 0.000; rss: 0MB plugin registration
time: 0.563; rss: 0MB expansion
time: 0.000; rss: 0MB maybe building test harness
time: 0.000; rss: 0MB maybe creating a macro crate
time: 0.000; rss: 0MB checking for inline asm in case the target doesn't support it
time: 0.001; rss: 0MB complete gated feature checking
time: 0.034; rss: 0MB parsing
time: 0.000; rss: 0MB recursion limit
time: 0.000; rss: 0MB crate injection
time: 0.000; rss: 0MB plugin loading
time: 0.000; rss: 0MB plugin registration
time: 0.148; rss: 0MB expansion
time: 0.000; rss: 0MB maybe building test harness
time: 0.000; rss: 0MB maybe creating a macro crate
time: 0.000; rss: 0MB checking for inline asm in case the target doesn't support it
time: 0.001; rss: 0MB complete gated feature checking