Skip to content

Instantly share code, notes, and snippets.

View BuckarooBanzay's full-sized avatar
🤷‍♂️

Buckaroo Banzai BuckarooBanzay

🤷‍♂️
View GitHub Profile
-- Run this script via qa_block (or similar); This checks if on_rightclick crashes without a valid ItemStack
local player = minetest.get_player_by_name("Niklp") -- change this to your name
local pos = vector.new(0,0,0)
local count = 0
for _, node in pairs(minetest.registered_nodes) do
if not node.name then
minetest.log("warning", dump(node))
end
minetest.set_node(pos, {name = node.name})
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
--Light Controller 2
--A product of Advanced Mesecons Devices, a Cheapie Systems company
--This is free and unencumbered software released into the public domain.
--See http://unlicense.org/ for more information
local MODE_OFF = 0
local MODE_ON = 1
local MODE_DUSKDAWN = 2
local MODE_DAWNDUSK = 3
local MODE_GAMETIME = 4
@danieldietrich
danieldietrich / README.md
Last active February 14, 2024 13:15
The easiest way to bundle a simple TypeScript web application

THIS README IS OUTDATED AND UNMAINTAINED - PLEASE DON'T RELY ON THIS

The easiest way to bundle a simple TypeScript web application

Packaging JavaScript applications can be a bit overwhelming. The popular project uglifyjs does not support ES6, it is cumbersome to configure the allmighty Webpack, bundlers like Parcel and Microbundle still have bugs or do not compile to ESM bundles that work in a browser. It is hard to figure out the best way to bundle an application.

Here I give a small example, how we achieve the goal using the

@mrflix
mrflix / OrbitControls.js
Last active November 29, 2021 02:44
Three.OrbitControls for multiple instances on a page.Usage: controls = new THREE.OrbitControls(camera, document, renderer.domElement); Based on: http://threejs.org/examples/js/controls/OrbitControls.js
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
* @author mrflix / http://felixniklas.de
*
* released under MIT License (MIT)
*/