Skip to content

Instantly share code, notes, and snippets.

View KyGuy2002's full-sized avatar

IEatBeans KyGuy2002

View GitHub Profile
@KyGuy2002
KyGuy2002 / wyze-mac-ip-table
Created June 12, 2024 04:42
Prints a table of macs, reported ips, and real ips of wyze devices
import os
from wyze_sdk import Client
access_token = "INSERT WYZE ACCESS TOKEN (FOUND IN DEV TOOLS WHEN ACCESSING MY.WYZE.COM/LIVE)"
print("Network Scan...")
scan_res = os.popen(f'arp -a').readlines()
print("Scan Complete.")
@KyGuy2002
KyGuy2002 / drizzle-studio-codespaces
Last active May 6, 2025 21:13
Using Drizzle Studio for local database access in GitHub Codespaces
Drizzle Studio is a cloud hosted web ui `local.drizzle.studio`.
It connects to the local hosted api that is started when using `drizzle-kit studio` in your terminal.
By default, the ui tries to connect to localhost:4983.
If using github codespaces, the server will be at a link like `your-codespace-name-4983.app.github.dev`.
If you try to use the `--host` param for the cli it won't work. (https://github.com/drizzle-team/drizzle-kit-mirror/issues/381)
Instead, use the `?host` query param when accessing `local.drizzle.studio`.
@KyGuy2002
KyGuy2002 / d1-binding-hash-converter
Created April 25, 2024 05:32
Converts the Cloudflare D1 binding to the hash used as the sqlite filename by Miniflare
import crypto from "crypto";
function convert(binding) {
const key = crypto.createHash("sha256").update("miniflare-D1DatabaseObject").digest();
const nameHmac = crypto
.createHmac("sha256", key)
.update(binding)
.digest()
.subarray(0, 16);
const hmac = crypto
@KyGuy2002
KyGuy2002 / java-eating-ram.md
Last active March 12, 2022 11:38
Minecraft Java Server Eating RAM

Minecraft Java Server Eating RAM

Having memory issues with your spigot, paper, or other Minecraft server software? Your in the right place!

How Does Java Handle RAM?

Unlike many languages, Java, which is what your server runs on, manages and collects memory by itself! This makes life Much easier for developers, but can be a little confusing for you, the server owner.

Java is an object oriented programming language, which means that every bit of code is an object that's