Skip to content

Instantly share code, notes, and snippets.

@parksj10
parksj10 / create-usb.sh
Created August 16, 2023 03:35 — forked from bmatcuk/create-usb.sh
Creating a Bootable Windows USB from ISO on a Mac
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
# This will output a bunch of info about all of the disk drives connected to
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is
# some number starting at 0. Now, insert your USB drive and run the command
# again. You should see a new entry. Make note of the name (ie, /dev/diskX).
diskutil list
@parksj10
parksj10 / bom2grouped_csv_jlcpcb.xsl
Created April 4, 2023 01:14 — forked from arturo182/bom2grouped_csv_jlcpcb.xsl
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
@parksj10
parksj10 / placement_helpers.py
Last active May 23, 2023 23:15
KiCad python script for circular array, using Python3 and KiCAD 7.0
# Python script to place components in a circle
# based on http://kevincuzner.com/2017/04/28/arranging-components-in-a-circle-with-kicad/
# but ported to Python 3 and KiCad 7.x
# You can just open "Tools->Scripting Console" and paste the whole thing.
# Needs to be in 3 parts: first the import line, then the function definition (and hit enter twice),
# and finally the place_circle call.
# updated to use mm instead of mils
import math
@parksj10
parksj10 / stackOverflow---hello-world-esp32.c
Last active February 7, 2023 18:05
ESP IDF Hello World Example (with patches for current toolchain 220107)
/* Hello World Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include "sdkconfig.h"
@parksj10
parksj10 / stackOverflow---esp-idf-settings.txt
Last active February 7, 2023 18:05
ESP-IDF VSCode Settings 230107
ESPRESSIF
ESP-IDF Extension for Visual Studio Code
ESP-IDF
ESP-IDF Tools
Python virtual environment
Installing ESP-IDF...
ESP-IDF:
Installed in /Users/josh/esp/esp-idf
Installing ESP-IDF Tools...
@parksj10
parksj10 / stackOverflow--launch.json
Last active February 7, 2023 18:07
VSCode launch.json for debugging using gdb/openocd
{
"version": "0.2.0",
"configurations": [
{
"name": "GDB",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
"MIMode": "gdb",
"miDebuggerPath": "${command:espIdf.getXtensaGdb}",
@parksj10
parksj10 / c_cpp_logs.txt
Last active January 26, 2023 06:30
logs for C/C++ extension that doesn't automatically show errors
loggingLevel: Debug
cpptools/didChangeCppProperties
Code browsing service initialized
Attempting to get defaults from C++ compiler in "compilerPath" property: '/Users/josh/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc'
Querying compiler for default C++ language standard using command line: /Users/josh/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -x c++ -E -dM /dev/null
Detected language standard version: gnu++14
Querying compiler for default C language standard using command line: /Users/josh/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -x c -E -dM /dev/null
Detected language standard version: gnu17
Querying compiler's default target using command line: "/Users/josh/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc" -dumpmachine
Compiler returned default target value: xtensa-esp32-elf
@parksj10
parksj10 / machine.js
Created April 8, 2021 20:23
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions