Skip to content

Instantly share code, notes, and snippets.

@sgvj
sgvj / Asakuki.yaml
Last active June 2, 2024 22:43
My Asakuki Esphome Configuration file
# This fits my needs, some logic could/should be added so let me know if you figure it out
# I deliberarly de-coupled lights and mist
# Most of my useage comes from automations that trigger actions, I have a single mist on/off switch in HomeAssistant UI
substitutions:
devicename: asakuki
esphome:
name: $devicename
platform: ESP8266
@paralin
paralin / make-multiarch.bash
Created October 23, 2021 21:21
Create a multi-arch docker image from arch tags
#!/bin/bash
set -eo pipefail
pull_image() {
if ! docker inspect $1 ; then
docker pull $1
fi
docker inspect $1
}
@ktprograms
ktprograms / README.md
Last active April 1, 2022 10:17
Swift program that connects to the QEMU Guest Agent on a localhost TCP socket and runs guest-set-time to re-sync the Guest Time after the Host wakes from sleep.

How to use this

Steps before launching the VM

  1. Open the VM Configuration
  2. Go to the QEMU tab and scroll to the bottom.
  3. Click on the text box with the grey text New...
  4. Paste these two lines into it:
-chardev socket,port=4321,host=127.0.0.1,server,nowait,id=qga0
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
@haridhayal11
haridhayal11 / exynos2100_gcam_guide.md
Last active April 2, 2024 01:36
Google Camera for Galaxy S21 Series

Google Camera for Galaxy S21 Series

  • Tested on
    • OneUI 4.x/5.x based Stock/Custom ROMs.
    • GSI with OneUI 4.x/5.x stock firmware.
    • Front Camera Does not work.

S21, S21 FE & S21 Plus

  • 0.5x, 1x and 3x lenses work.

Instructions

@marty0678
marty0678 / example_usage.py
Created March 8, 2024 21:57
Django Rest Framework Base Model CRUD Class
# Views
class UserProfileViewSet(BaseModelViewSet):
"""View set for the UserProfile."""
ENABLE_LIST = True
ENABLE_RETRIEVE = True
ENABLE_PARTIAL_UPDATE = True
ENABLE_PAGINATION = True
LIST_CACHE_KEY = "users:user-profiles-list"