Skip to content

Instantly share code, notes, and snippets.

@HDR
HDR / CC:Tweaked Play Any Song.md
Last active March 4, 2025 22:39
A guide for cc:tweaked on how to play back any .wav file ingame.

Requirements:

  • A computer hooked up to a CC:Tweaked Speaker or a (Advanced) Noisy Pocket Computer
  • Any .wav file

Howto:

  1. Download the audio player code & b64 pastebin get QmkYgCZs play & pastebin get ntsWPAcq b64 (you only need to do this once)
  2. Convert your audio file to wav
  3. Convert the wav file to dfpwm using https://martinrefseth.com/wav2dfpwm/ (Now supports bulk wav to dfpwm or base64 encoded dfpwm)
  4. Copy the base64 encoded DFPWM from the text box
@HDR
HDR / HuaweiHRP_OBS.py
Last active February 15, 2025 08:05
An OBS script that displays your heart rate as reported by a Huawei smart watch in HR Data Broadcast Mode, requires bleak (pip install bleak)
#By HDR
#https://gist.github.com/HDR/02cec215db1e97349008e80a3116a189
#V1.0
import obspython as obs
import asyncio
import threading
from bleak import BleakScanner, BleakClient
source_name = "Heart Rate"
current_text = "Awaiting Connection..."
@HDR
HDR / Huawei_HPR.py
Last active February 15, 2025 04:31
Connect to a Huawei smart watch in Huawei HR Data Broadcast mode and display the heartrate
import asyncio
from bleak import BleakScanner, BleakClient
huawei_device = None
huawei_heartrate_char_uuid = "00002a37-0000-1000-8000-00805f9b34fb"
async def notification_handler(sender, data):
heart_rate = data[1]
print(f"Heart Rate:{heart_rate} BPM", end="\r")

Sending Voice Messages via Discord Bots

Voice Message

Requirements:

  • An .ogg format audio file (opus not vorbis)
  • A Discord bot Token

Notes:

  • files created via the vorbis encoder may not play back on mobile, therfore it's suggested to use the opus encoder for your .ogg files
@HDR
HDR / RS3Console.md
Last active October 26, 2022 09:55
Undocumented Runescape Console functionality

Undocumented Console functionality

Command Description Example
<col=ffffff> Changes the color of text <col=ff0000>This text is red
<sprite=1> Prints a sprite in console Looks like it's <sprite=69>
<img=1> Prints a chat badge in console Look at my JMOD crown! <img=1>
<lt> Prints a "less-than" symbol <lt> Hello World
<gt> Prints a "Greater-than" symbol <gt> Hello World
@HDR
HDR / ProjectRed_Segment_Display_Gate.md
Last active September 11, 2022 00:39
ProjectRed Segment Display Gate

ProjectRed Segment Display gates are controlled using Bundled Cables, each bundled cable has 16 colors, in this case the first 8 (1-8) control the right display, while the last 8 (9-16) control the left display.

Right Display

Numbers represent the decimal value for each segment

Digit (DP) G F E D C B A Hex Dec
@HDR
HDR / EmbeddedActivities.md
Last active May 27, 2023 11:46
Discord Embedded Activities List (Embedded Application ID's)
Activity ID
Awkword 879863881349087252
Betrayal.io 773336526917861400
Checkers in the park 832013003968348200
Chess in the park 832012774040141894
Doodle Crew 878067389634314250
Fishington.io 814288819477020702
Letter Tile 879863686565621790
Poker Night 755827207812677713
@HDR
HDR / argon1.sh
Last active September 24, 2024 09:37
Argon One script (Pi3/Pi4)
#!/bin/bash
argon_create_file() {
if [ -f $1 ]; then
sudo rm $1
fi
sudo touch $1
sudo chmod 666 $1
}
const char joey_firmware[]={
0x00, 0x50, 0x00, 0x20, 0x95, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@HDR
HDR / M5StickDatasheet.ino
Last active January 29, 2020 12:07
The M5StickC Datasheet, hosted on the M5StickC itself (Requires https://github.com/tzapu/WiFiManager/tree/development)
#include <M5StickC.h>
#include <WiFi.h>
#include <DNSServer.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <WiFiManager.h>
#include <ESPmDNS.h>
#include <WiFiClient.h>
WebServer webServer(80);