Skip to content

Instantly share code, notes, and snippets.

View Teraskull's full-sized avatar
💻
Working from home

Anton Grouchtchak Teraskull

💻
Working from home
View GitHub Profile
@idcrook
idcrook / zigbee2mqtt-z2m2-samsung-smartthings-button.yaml
Last active June 9, 2025 15:49
Home assistant blueprint using event entity (Z2M 2.x) for Smartthings Button
blueprint:
name: Zigbee2MQTT 2.x - Samsung SmartThings Button - event entity
description: Automate your Samsung SmartThings button using Zigbee2MQTT.
domain: automation
input:
samsung_smartthings_button:
name: Samsung SmartThings Button
description: The Samsung SmartThings button to use
selector:
entity:
@yorickdowne
yorickdowne / friday.md
Last active October 31, 2025 16:17
Debian 13 trixie upgrade

Debian 13

Caution Upgrading from Debian 12 to Debian 13 on machines with mdadm has intermittently failed for me; symptom is that grub EFI is not up to date and system boots into BIOS. Root cause under investigation; it might not be related to mdadm.

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 13 "trixie" from Debian 12 "bookworm" can be helpful. 3rd-party repos are handled with a find command.

Note upgrade is only supported from Debian 12 to Debian 13. If you are on Debian 11, upgrade to Debian 12 first. Then once on Debian 12, you can upgrade to Debian 13.

#include <stdio.h>
#include <stdint.h>
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo
{
while(len--)
{
crc ^= *buffer++ << 8;
int bits = 0;
do
@sharunkumar
sharunkumar / adb-dns.bat
Created February 7, 2020 07:08
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active October 29, 2025 12:38
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active October 31, 2025 18:47
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active November 1, 2025 12:16
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@Surendrajat
Surendrajat / elementaryos.md
Last active December 2, 2021 21:16 — forked from suberb/elementaryos.md
elementaryOS | Things I Do After Installing elementary OS Hera

First Things First

  • Enable PPA

     sudo apt update
     sudo apt install software-properties-common apt-transport-https curl
  • Install apt-fast [Yes! it's really fast]

@suberb
suberb / elementaryos.md
Last active September 6, 2025 14:29
elementaryOS | Things To Do After Installing Elementary OS Loki [Best OS For Switching From Windows & Mac]

FIRST THING FIRST


  • Update OS
sudo apt-get update && sudo apt-get upgrade