Skip to content

Instantly share code, notes, and snippets.

@guywaldman
guywaldman / git_tricks.sh
Created April 16, 2025 10:37
git tricks
# Stash without removing staged files (https://stackoverflow.com/a/60555832/6184088)
git stash store $(git stash create) -m "Stash commit message"
@guywaldman
guywaldman / style.grass
Last active February 4, 2025 22:21
Neo4j Grass style
node {
font-size: 12px;
}
@guywaldman
guywaldman / README.md
Created January 16, 2024 23:19
troubleshoot-ftl

Results from running https://github.com/fasterthanlime/troubleshoot-ftl/blob/main/troubleshoot-ftl.sh:

PING szaw.bearcove.cloud (151.115.38.160): 56 data bytes
64 bytes from 151.115.38.160: icmp_seq=0 ttl=44 time=91.887 ms
conn 0.093084s | appconn 0.204664s | pretrans 0.204850s | starttrans 0.651889s | total: 0.817203s

PING6(56=40+8+8 bytes) 2a0d:6fc2:4d21:6b00:a974:1e3c:46d9:e09 --> 2001:bc8:1e80:2d0::
16 bytes from 2001:bc8:1e80:2d0:dc00:ff:fe0d:eabd, icmp_seq=0 hlim=49 time=88.405 ms
conn 0.000000s | appconn 0.000000s | pretrans 0.000000s | starttrans 0.000000s | total: 3.006303s
@guywaldman
guywaldman / README.md
Last active July 26, 2023 09:49
STM32 Setup on macOS

Developing for STM32 on macOS

This goes over how to setup a development environment for embedded programming on macOS systems, specifically for the ARM Cortex STM32WB55 board (but probably applies generally for other boards with minor adjustments).

  1. Follow this guide to setup the workfolder: https://gist.github.com/csukuangfj/bfe2be78eda3a24a5164005b1092c94b

    I will add more detailed steps in this guide at a later time, as well as prerequisites for this setup.

  2. Copy /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/SVD/STM32WB55_CM4.svd (or the SVD that's appropriate for your specific board) to the root of your workfolder.

@guywaldman
guywaldman / awesome_prompts.md
Last active April 16, 2023 20:45
Awesome Prompts

Awesome Prompts

Prompt Creator

From https://twitter.com/BrianRoemmele/status/1636034131116314625

Please forget all prior prompts. I want you to become my Prompt Creator.
Your goal is to help me build the best detailed prompt for my needs.
This prompt will be used by you, ChatGPT. Please follow this following process:
@guywaldman
guywaldman / InstallFont.ps1
Last active January 18, 2023 20:52
Install font on Windows via PowerShell
$FontsFolder = "$env:TEMP\Fonts"
New-Item -ItemType Directory -Path $FontsFolder -Force
Invoke-WebRequest https://github.com/JetBrains/JetBrainsMono/releases/download/v2.304/JetBrainsMono-2.304.zip -O $FontsFolderJBM.zip
Expand-Archive -Path $FontsFolder\JBM.zip -DestinationPath $FontsFolder/JBM
Get-ChildItem $FontsFolder\JBM\fonts\ttf\*.ttf | ForEach-Object { $fonts.CopyHere($_.fullname) }
Remove-Item -Path $FontsFolder -Recurse -Force
@guywaldman
guywaldman / pre-commit
Last active August 9, 2022 20:37
git pre-commit hooks to forbid DNC messages, as seen on https://guywaldman.com/blog/git-hooks
#!/usr/bin/env bash
# Forbidden phrases.
FORBIDDEN_PHRASES=("DNC" "DO NOT COMMIT" "TODO(PR)")
# ANSI color codes.
CLEAR="\033[0m"
RED="\033[00;31m"
BLUE="\033[00;34m"
@guywaldman
guywaldman / wasm-markdown-demo-file.md
Last active December 26, 2020 22:51
ILDC Frontend Bond Markdown Test File

📦✨ wasm-pack

Your favorite Rust → Wasm workflow tool!

@guywaldman
guywaldman / client_server.pyv
Created August 17, 2019 22:32
Client-server example for Mypyvy, ported from Ivy
# https://github.com/Microsoft/ivy/blob/master/doc/examples/client_server_example.md#discovering-a-safety-invariant
sort client
sort server
mutable relation link(client, server)
mutable relation semaphore(server)
init semaphore(S)
init !link(C, S)
@guywaldman
guywaldman / README.md
Last active August 7, 2019 20:14
Mypyvy CTI Representation