Skip to content

Instantly share code, notes, and snippets.

View AaronLi's full-sized avatar
🐲

Aaron Li AaronLi

🐲
View GitHub Profile
@AaronLi
AaronLi / gist:6238f02d3d269a3ec6986abec9fe4811
Last active May 1, 2026 09:12
CS2 Bomb audio generation
import math
import time
import pyaudio
# creates the audio sound matching the bomb beeping, then plays the audio at the correct intervals to align with the cs2 bomb beep rate
pa = pyaudio.PyAudio()
def create_beep(duration = 0.1) -> bytes:
data_out = [0] * int(44100 * 0.01)
@AaronLi
AaronLi / substitae2.lua
Created May 13, 2021 16:38
Minecraft Item storage but keeps the item position table stored across the disk rather than in memory
local component = require("component")
local serialization = require("serialization")
local io = require("io")
local filesystem = require("filesystem")
local thread = require("thread")
local computer = require("computer")
local sides = require("sides")
local RETURN_CHEST = "minecraft:trapped_chest"
function find_transposers()
@AaronLi
AaronLi / miner.lua
Last active June 28, 2020 01:30
Mining program for an Opencomputers robot
local robot = require("robot")
local computer = require("computer")
local serialization = require("serialization")
local filesystem = require("filesystem")
local component = require("component")
local sides = require("sides")
local WORK_FILE = "/home/work.dat"
local POS_FILE = "/home/pos.dat"
local SECONDS_PER_BLOCK = 1.75
@AaronLi
AaronLi / substitae.lua
Last active June 27, 2020 20:21
Minecraft Item Storage system software for OpenComputers that is able to substitute for an AE2 item storage system
local component = require("component")
local serialization = require("serialization")
local io = require("io")
local filesystem = require("filesystem")
local thread = require("thread")
local computer = require("computer")
local RETURN_CHEST = "minecraft:trapped_chest"
function find_transposers()
return component.list("transposer")
@AaronLi
AaronLi / quick_type.js
Last active June 19, 2020 22:59
A few lines of javascript to make https://typing-speed-test.aoeu.eu/ believe you're typing very quickly
// paste into your console on https://typing-speed-test.aoeu.eu/ to make it show a really big number
space_down = $.Event("keydown", {keyCode:32});
space_up = $.Event("keyup", {keyCode:32});
input_field = $("#input")
while($("#timer").text() > 0) {
target_text = $("#currentword").text()
input_field.val(target_text + " ");