Skip to content

Instantly share code, notes, and snippets.

View ShayBox's full-sized avatar

Shayne Hartford ShayBox

View GitHub Profile
@ShayBox
ShayBox / main.rs
Created February 13, 2024 03:27
Infinite Craft automated with headless_chrome
use std::{collections::HashSet, time::Duration};
use anyhow::Result;
use derive_config::{json::Value, DeriveJsonConfig, DeriveTomlConfig};
use headless_chrome::{browser::default_executable, Browser, LaunchOptions};
use serde::{Deserialize, Serialize};
#[derive(Debug, Default, DeriveJsonConfig, Deserialize, Serialize)]
struct Combinations(HashSet<(String, String)>);
@ShayBox
ShayBox / docker-compose.yml
Created October 23, 2023 18:02
Windscribe + Gluetun + Wireguard
version: "3"
services:
windscribe-mountain:
image: qmcgaw/gluetun
container_name: windscribe-mountain
# line above must be uncommented to allow external containers to connect.
# See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
cap_add:
- NET_ADMIN
devices:
@ShayBox
ShayBox / main.py
Created July 6, 2023 04:15
Temporary low voltage detection using standard deviation for RPI Pico W & CircuitPython
import analogio
import board
import math
import time
voltage = analogio.AnalogIn(board.VOLTAGE_MONITOR)
voltage_conversion_factor = 3 * 3.3 / 65535
def calculate_mean(data):
return sum(data) / len(data)
@ShayBox
ShayBox / CubemapExtractor.cs
Created June 26, 2023 08:59
Unity editor script that extracts 6 sided images from a cubemap
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Linq;
public class CubemapExtractor : Editor
{
private static readonly CubemapFace[] CubemapFaces = new CubemapFace[]
{
CubemapFace.PositiveX, // Right
@ShayBox
ShayBox / CustomPlaylist.py
Created March 12, 2023 22:30
Create ProTV YouTube Playlists
from dataclasses import astuple, dataclass
from yt_dlp import YoutubeDL
from json import JSONEncoder
from tqdm import tqdm
import json
class FakeLogger:
def debug(self, msg):
pass
@ShayBox
ShayBox / ShaysUploadTool.cs
Last active April 27, 2023 02:09
My custom VRChat avatar upload tool
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using VRC.SDK3.Avatars.Components;
using VRC.SDKBase.Editor;
namespace ShayBox {
@ShayBox
ShayBox / README.md
Last active October 8, 2023 02:35
Mi Band 5 to VRChat OSC

I couldn't get Pulsoid to work with Zepp Life (new Mi Fit), and HypeRate only supports Mi Band on iOS
Install Notify for Mi Band, Tasker, Termux (F-Droid/GitHub), Termux Tasker (F-Droid/GitHub)
Enable Tasker support in Notify, enable External access in Termux
Install Python in Termux, then install python-osc with pip
Create an Intent task for com.mc.miband.heartRateGot, Create a Termux action to python, provide the script in args and use %value to pass the heartrate to the script
Here's my script, change the IP to your computers LAN address, the port is correct for VRChat.
I would test it on your computer first to make sure you have OSC working, use the debug window.

import sys
from pythonosc import udp_client