Skip to content

Instantly share code, notes, and snippets.

View DavidBuchanan314's full-sized avatar
🌍
Hack the planet!

David Buchanan DavidBuchanan314

🌍
Hack the planet!
View GitHub Profile
@rendello
rendello / _utf8_case_data.rs
Last active November 20, 2024 15:46
Unicode codepoints that expand or contract when case is changed in UTF-8. Good for testing parsers. Includes the data `utf8_case_data.rs` and the script to generate it, `generate_utf8.py`.
/*
Copyright (c) 2024 Rendello
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
@edavis
edavis / gist:35a65aa76cf58ce45f8d012e59373f2e
Last active August 20, 2024 19:52
Timestamp of when every "3*" TID begins
3222222222222 2005-09-05T05:58:26.842Z
3322222222222 2006-10-17T11:24:38.931Z
3422222222222 2007-11-28T16:50:51.020Z
3522222222222 2009-01-08T22:17:03.109Z
3622222222222 2010-02-20T03:43:15.197Z
3722222222222 2011-04-03T09:09:27.286Z
3a22222222222 2012-05-14T14:35:39.375Z
3b22222222222 2013-06-25T20:01:51.464Z
3c22222222222 2014-08-07T01:28:03.553Z
3d22222222222 2015-09-18T06:54:15.642Z
@jimmywarting
jimmywarting / block-reader.js
Last active January 25, 2024 13:15
Memory efficient block reader of fetch- `Response.body` a.k.a `RedableStream`
/**
* Read a stream into same underlying ArrayBuffer of a fixed size.
* And yield a new Uint8Array view of the same underlying buffer.
* @param {ReadableStreamBYOBReader} reader
* @param {number} chunkSize
*/
async function* blockReader(reader, chunkSize) {
let offset = 0;
let buffer = new ArrayBuffer(chunkSize)
let done, view
@throwaway96
throwaway96 / notes.md
Last active November 19, 2024 00:18
Enabling debug and getting root on LG webOS by modifying NVM

Warnings

What you do with this information is your own responsibility. If you brick your TV trying this, it's not my fault. You should probably have some electronics experience if you want to attempt this.

This is going to involve opening your TV and attaching wires to the pins of an integrated circuit. If you're not comfortable with that, this is not for you.

This document is a work in progress.

debugstatus

LG TVs since at least the era of NetCast and "Global Platform" (webOS predecessors) have had the notion of a debug level, generally called "debugstatus". There are three modes: DEBUG, EVENT, and RELEASE. TVs normally operate in RELEASE mode. DEBUG mode enables a variety of logging and other debugging features in webOS, including access to the bootloader console and debug menus via serial. EVENT is similar to DEBUG, although it may not enable as much logging and has other relatively minor differences.

// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @match *://*.x.com/*
// @grant none
// @version 1.9.2
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw
@TheBrokenRail
TheBrokenRail / README.md
Last active June 10, 2024 16:26
Jailbreak Firefox!

Jailbreak-Firefox

This script allows you to install unsigned extensions (ones that aren't approved by Mozilla) on normal Firefox builds and the official Snap! That's right, no "Firefox Developer Edition" nonsense required!

⚠️ Disclaimer ⚠️

This script is not well tested, like at all. This script might break things, possibly important things. You should probably take a backup of your Firefox profile before using it. You have been warned.

Dependencies

sudo apt install -y curl unzip zip
# Only needed when jailbreaking the Snap
@theCalcaholic
theCalcaholic / main.py
Last active January 20, 2024 00:38
PoC: Read from video capture device using xdg-desktop-portals, pipewire and gstreamer and consume the video with VidGear/OpenCV
#!/usr/bin/python3
import re
import numpy as np
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from time import sleep
from vidgear.gears import WriteGear
from gstreamer import GstContext, GstPipeline, GstApp, Gst, GstVideo
@czak
czak / webos
Last active March 1, 2024 22:33
Meson cross file for webos
[constants]
arch = 'arm-webos-linux-gnueabi'
toolchain = '/home/czak/projects/webos/webos-sdk-x86_64/1.0.g'
sysroot = toolchain / 'sysroots/armv7a-neon-webos-linux-gnueabi'
[host_machine]
system = 'webos-linux'
cpu_family = 'arm'
cpu = 'armv7a'
endian = 'little'
@jam1garner
jam1garner / switch-gdb-cheatsheet.md
Last active October 30, 2024 05:40
GDB for Switch Modding Cheatsheet/Tutorial

This is a mini-tutorial of sorts for getting started with gdb on the Switch, with the target audience being people who want to mod and/or reverse games, with no prerequisite knowledge of gdb. The goal will be to walk you through some of the basic workflows needed to use a debugger on the Switch, while being brief enough for skimming for when you forget things.

If some part is unclear, your OS doesn't have install instructions, or you feel part of your workflow should be added here, feel free to comment any additions.

(If you only need a quick reference Jump to the Appendix)

Installing GDB

First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of

@ryancdotorg
ryancdotorg / wzip.py
Last active October 22, 2024 14:42
Partial/streaming zip downloader
#!/usr/bin/env python3
# SPDX-License-Identifier: 0BSD or CC0-1.0 or MIT-0 or Unlicense
# Copyright (c) 2023, Ryan Castellucci, No Rights Reserved
import io, sys
import datetime
import argparse
import requests
import operator
import struct