Skip to content

Instantly share code, notes, and snippets.

@LewkyB
LewkyB / chicken_marinades.md
Last active June 26, 2022 18:44
meat recipes

list of possibly good ingredients

  • citrus
    • greek yogurt
    • lime
    • lemon
    • Buttermilk
    • Beer
  • spice
    • whole cumin toasted and ground
  • lots of salt
@LewkyB
LewkyB / breakfast_readme.md
Last active July 25, 2022 11:40
my breakfast recipes

fluffy_buttermilk_pancakes.txt

I like this recipe because it nails the bready fluffy butter milk pancakes. Make sure your stuff is room temperature so you don't resolidify your butter on mixing

runny_egg_and_meat_sandwichrecipe.txt

You can use something other than mustard for this. I've been using Trader Joe's Chili Onion Crunch in combination with mayo and mustard.

import linecache
import os
import tracemalloc
def display_top(snapshot, key_type='lineno', limit=10):
snapshot = snapshot.filter_traces((
tracemalloc.Filter(False, "<frozen importlib._bootstrap>"),
tracemalloc.Filter(False, "<unknown>"),
))
top_stats = snapshot.statistics(key_type)
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/raspberrypi4-homeassistant:stable"
volumes:
- /home/pi/home_assistant/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
@LewkyB
LewkyB / pre-commit_generated_script.sh
Created May 1, 2021 17:47
shell script example generated by pre-commit
#!/usr/bin/env python3
# File generated by pre-commit: https://pre-commit.com
# ID: unique_id
import os
import sys
# we try our best, but the shebang of this script is difficult to determine:
# - macos doesn't ship with python3
# - windows executables are almost always `python.exe`
# therefore we continue to support python2 for this small script
@LewkyB
LewkyB / oven_thermometer.cpp
Created April 20, 2021 21:18
oven thermometer that connects to wifi and communicates temp to message broker. can also receive messages from broker
/*
oven thermometer with MQTT
based on:
- https://github.com/pawl/oven_thermometer
- https://simple-circuit.com/esp8266-nodemcu-ili9341-tft-display/
- https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/
parts:
- 2.8in SPI TFT ILI9341 screen
- MAX6675 temperature sensor
- k-type thermocouple
@LewkyB
LewkyB / playback_device_switcher.ahk
Created July 1, 2020 18:11
right alt + F1 - headphones // right alt + F2 - speakers (you can add more devices)
; PURPOSE: Use hotkeys to switch between audio devices
; source: https://www.autohotkey.com/boards/viewtopic.php?t=49980
Devices := {}
IMMDeviceEnumerator := ComObjCreate("{BCDE0395-E52F-467C-8E3D-C4579291692E}", "{A95664D2-9614-4F35-A746-DE8DB63617E6}")
; IMMDeviceEnumerator::EnumAudioEndpoints
; eRender = 0, eCapture, eAll
; 0x1 = DEVICE_STATE_ACTIVE
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
// used to allow for window resizing
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow* window);
const char* vertex_shader_source = "#version 330 core\n"
@LewkyB
LewkyB / gist:56cdb68ad75345d40f64a64ea5c95482
Created May 23, 2020 04:23
AHK script for RAlt + t will create a new text file in file explorer focus
; create new text file in current window focus
#IfWinActive ahk_class CabinetWClass
>!t:: ;explorer - create new text file and focus/select it
#IfWinActive ahk_class ExploreWClass
>!t:: ;explorer - create new text file and focus/select it
;note: similar to: right-click, New, Text Document
vNameNoExt := "New Text Document"
vDotExt := ".txt"
WinGet, hWnd, ID, A
for oWin in ComObjCreate("Shell.Application").Windows