Skip to content

Instantly share code, notes, and snippets.

@Dregu
Dregu / instant-replay-playlist.lua
Last active October 1, 2020 00:49
OBS-studio script to play instant replays and/or automatically add replays to VLC playlist for later
obs = obslua
source_name = ""
vlc_name = ""
scene_name = ""
replaying = false
autoclear = false
addall = false
replaylength = 10
instant_hotkey_id = obs.OBS_INVALID_HOTKEY_ID
add_hotkey_id = obs.OBS_INVALID_HOTKEY_ID
@Dregu
Dregu / warmup.png
Last active March 25, 2018 19:52
Warmup screenshot
Attached
@Dregu
Dregu / fuck-twitch.user.js
Last active June 15, 2023 02:32
Userscript to hide stupid fucking streamers or games from Twitch
// ==UserScript==
// @name Fuck Twitch
// @namespace FuckTwitch
// @description Hide stupid fucking streamers or games from Twitch
// @version 1.0
// @author Dregu
// @match https://*.twitch.tv/*
// @run-at document-start
// ==/UserScript==
@Dregu
Dregu / reddit_auto_expand.user.js
Last active December 10, 2021 15:51
Reddit Auto Expand
// ==UserScript==
// @name Reddit Auto Expand and keyboard navigation
// @namespace http://www.reddit.com/
// @version 0.1
// @description Auto expand all expandos on new reddit and a keyboard navigation that's not retarded.
// @author Dregu
// @match https://www.reddit.com/*
// @grant none
// ==/UserScript==
#!/usr/bin/env node
var gst = require('gstreamer-superficial');
const port = process.env.UDPPORT || 5000
const timeout = process.env.UDPTIMEOUT || 500
var pipeline = new gst.Pipeline('udpsrc name=src port='+port+' timeout='+timeout+'000000 ! application/x-rtp,media=audio,clock-rate=44100,encoding-name=L16,channels=2,payload=96 ! rtpL16depay ! audioconvert ! autoaudiosink');
var src = pipeline.findChild('src');
pipeline.pollBus((msg) => {
if (msg.name == 'GstUDPSrcTimeout') {
console.log(new Date, 'source timeout in port ' + src.port);
@Dregu
Dregu / Noita.asl
Last active May 29, 2022 18:02
Noita Scriptable Auto Splitter (+seed/kill display) for LiveSplit
/*
* Noita Scriptable Auto Splitter + seed display + kill counter
* Starts on spawn
* Splits on work
* Resets on death or new game
*
* You have to edit the logPath below to point to your installation for this to actually work, I don't know where your game is.
* Get https://github.com/hawkerm/LiveSplit.ASLVarViewer to display world seed and/or kill counter to your stream, mom or whatever.
*/
@Dregu
Dregu / README.md
Last active March 14, 2024 14:23
Spelunky 2 custom tile codes

Spelunky 2 custom tile codes

Random custom tile codes and other crap for custom levels. Free for all!

@Dregu
Dregu / build.bat
Last active October 21, 2022 09:34
Overlunky/Playlunky build scripts
@echo off
:: build.bat [MSVC|Clang|Ninja] [Release|Debug|RelWithDebInfo] [custom options for cmake]
set A=Ninja
set B=Release
set C=-DIWYU=ON -DBUILD_INFO_DUMP=OFF -DBUILD_SPEL2_DLL=OFF
:: set C=-DPLAYLUNKY_CONAN_VERBOSE=ON
if /I [%1] == [MSVC] set A=MSVC
@Dregu
Dregu / Spelunky2_Character_Tags.lua
Last active February 2, 2023 11:04
Spelunky 2 character animation tags for Aseprite
--[[
How to make full character mods in Aseprite:
1. Save this file (Raw > Save page as...) to Aseprites "File > Scripts > Open Scripts Folder"
2. "File > Import Sprite Sheet" and select a char_..._full sheet or a _grid, use options:
- Type: By Rows
- Width: 128 px
- Height: 128 px
- [x] Include partial tiles (checked)
3. Run the script from "File > Scripts > Spelunky2_Character_Tags"
@Dregu
Dregu / import_weeklies_to_sandbox.py
Created January 23, 2024 05:06
Import all currently subscribed Poly Bridge 3 Weekly Challenge workshop layouts to default profile sandbox
# Import all currently subscribed Poly Bridge 3 Weekly Challenge workshop layouts to default profile sandbox
import urllib.request
import re
import sys
import winreg
import os
import math
import string
import shutil