Skip to content

Instantly share code, notes, and snippets.

View tgolsson's full-sized avatar

Tom Solberg tgolsson

View GitHub Profile
@tgolsson
tgolsson / pants
Last active November 10, 2022 20:36
Pants command
#!/usr/bin/env bash
find_parent_pants() {
path="$1"
while [ `realpath "$path"` != "/" ]; do
if [[ -f "$path/pants.toml" ]] ; then
if [[ -f "$path/pants_with_source" ]] ; then
echo "$path/pants_with_source"
else
echo "$path/pants"
@tgolsson
tgolsson / wasm-bindgen-macroquad.sh
Last active February 14, 2024 22:02
Compatibility shim for combining macroquad with wasm-bindgen.
#!/usr/bin/env bash
set -e
HELP_STRING=$(cat <<- END
usage: build_wasm.sh PROJECT_NAME [--release]
Build script for combining a Macroquad project with wasm-bindgen,
allowing integration with the greater wasm-ecosystem.

Keybase proof

I hereby claim:

  • I am tgolsson on github.
  • I am tgolsson (https://keybase.io/tgolsson) on keybase.
  • I have a public key ASC8FtTsC4Xz8eK7e2Uu-aayt0UMFw0-c5M-W7JjCihDQgo

To claim this, I am signing this object:

const int ENCODER_PIN_L = 0,
ENCODER_PIN_R = 1;
//this struct holds the pin numbers for the motor shield
struct MotorShieldPins {
int DIR_; //direction pin
int PWM_; //pwm pin
int BRK_; //brake pin
int CUR_; //current sensor