Skip to content

Instantly share code, notes, and snippets.

# Get Alacritty from https://alacritty.org/ and then copy the contents of this
# gist into ~/.alacritty.toml
#
# You can clone the Alacritty themes from https://github.com/alacritty/alacritty-theme
# and install Fira Code from https://github.com/tonsky/FiraCode
#
# Installing TLDR, the simplified-manual project - https://tldr.sh/ - has also been
# useful for me.
#
# You need to specify where you've cloned the themes repo in the first "include"
@robert-chiniquy
robert-chiniquy / prep.md
Last active April 25, 2024 17:18
Van prep checklist
@flaminggoat
flaminggoat / main.rs
Created March 3, 2023 21:23
ESP32 SD card access from Rust using esp_idf_sys
use std::io::{BufWriter, Write};
use std::ptr::{null, null_mut};
use std::time::Instant;
use esp_idf_sys as _; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported
use esp_idf_sys::c_types::{c_int, c_void};
use std::fs::{self, File};
fn main() {
@rajeshpachaikani
rajeshpachaikani / main.rs
Created December 9, 2022 14:29
RUST - ESP32-C3 Connect to WiFi
// Dependencies
// esp-idf-sys = { version = "0.31.11", features = ["binstart"] }
// esp-idf-svc = "0.43.4"
// esp-idf-hal = "0.39.3"
// embedded-hal = "0.2.7"
// embedded-svc = "0.23.1"
use std::{
thread::sleep,
time::Duration,
@rezen
rezen / aws_actions.txt
Last active June 16, 2023 10:55
It's nice having a list of AWS IAM actions
account:DisableRegion
account:EnableRegion
account:ListRegions
activate:CreateForm
activate:GetAccountContact
activate:GetContentInfo
activate:GetCosts
activate:GetCredits
activate:GetMemberInfo
activate:GetProgram
@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.
@jaredmoody
jaredmoody / Connect Airpods.applescript
Last active December 9, 2021 13:11
An Applescript to connect bluetooth devices, such as Airpods. Nice when paired with an alfred trigger.
# Don't use this script, use this one instead:
# https://gist.github.com/ieatfood/814b065964492f71f728da59a47413bc
tell application "System Events"
tell process "ControlCenter"
set bt to (first menu bar item whose title is "Bluetooth") of menu bar 1
click bt
set btCheckbox to checkbox 1 of scroll area 1 of group 1 of window "Control Center" whose title contains "AirPods Pro"
set btCheckboxValue to value of btCheckbox
tell btCheckbox to click
@garethr
garethr / convert.py
Last active July 7, 2021 02:40 — forked from phaer/convert.py
kubernetes open api to hcl2 spec
import sys
import json
from collections import OrderedDict
from contextlib import contextmanager
def resolve_json_pointer(spec, reference):
prefix, definitions, name = reference.split('/')
return spec.get(definitions).get(name)
@phaer
phaer / convert.py
Created August 15, 2018 03:47
kubernetes open api to hcl2 spec
import sys
import json
from collections import OrderedDict
from contextlib import contextmanager
def resolve_json_pointer(spec, reference):
prefix, definitions, name = reference.split('/')
return spec.get(definitions).get(name)