Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# obs-save-replay
# Copyright (C) 2023 notpeelz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
<Project InitialTargets="ValidateGamePath">
<!--
Add a GameFolder.props file to the solution to set your game path:
<Project>
<PropertyGroup>
<GameFolder>C:\Program Files (x86)\Steam\steamapps\common\GTFO</GameFolder>
</PropertyGroup>
</Project>
-->
@notpeelz
notpeelz / discord.js
Created November 5, 2020 16:50 — forked from silver-mixer/discord.js
Higher Discord volume control
(function() {
// The following utility function are taken from EnhancedDiscord, developed by
// joe27g <https://github.com/joe27g>, and licensed under an MIT License.
// All credit goes to joe27g for the breadth of the work regarding accessing
// webpack modules at runtime.
//
// ---
// MIT License
//
@notpeelz
notpeelz / Makefile
Created August 31, 2020 03:46
arduino-makefile nix workflow
ISP_PROG = stk500v1
ISP_PORT = /dev/ttyACM0
MONITOR_PORT = /dev/ttyUSB0
#AVRDUDE_OPTS = -U lfuse:w:0xF1:m -U hfuse:w:0xDD:m -U efuse:w:0xFF:m -v -v
BOOTLOADER_PATH = optiboot
BOOTLOADER_FILE = optiboot_attiny85_16000000L.hex
BOARD_TAG = attinyx5
BOARD_SUB = 85
VARIANT = tinyX5
F_CPU = 16000000L
@notpeelz
notpeelz / ways.cpp
Created May 27, 2020 02:33
num_ways recursion example
#include <iostream>
#include <vector>
/* create a function that does the following:
* `num_ways(total, ways)`
* - total is an integer
* - ways is a list of integers
* "Total is a number you want to get to and ways is the types of numbers
* you can add to get to the total. The function should return a list
* of lists that contains a series integers that add up to the total
@notpeelz
notpeelz / default.nix
Created April 4, 2020 20:35 — forked from lightdiscord/default.nix
Rust and wasm with nixos
with import <nixpkgs> {
overlays = map (uri: import (fetchTarball uri)) [
https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz
];
};
stdenv.mkDerivation {
name = "rust-wasm";
buildInputs = [
cargo-web
00000000 7b 22 6e 69 78 62 6c 64 32 37 22 3a 33 30 30 32 |{"nixbld27":3002|
00000010 37 2c 22 73 79 73 74 65 6d 64 2d 6a 6f 75 72 6e |7,"systemd-journ|
00000020 61 6c 2d 67 61 74 65 77 61 79 22 3a 31 31 30 2c |al-gateway":110,|
00000030 22 6e 69 78 62 6c 64 38 22 3a 33 30 30 30 38 2c |"nixbld8":30008,|
00000040 22 6e 69 78 62 6c 64 31 30 22 3a 33 30 30 31 30 |"nixbld10":30010|
00000050 2c 22 73 79 73 74 65 6d 64 2d 72 65 73 6f 6c 76 |,"systemd-resolv|
00000060 65 22 3a 31 35 33 2c 22 6e 69 78 62 6c 64 32 33 |e":153,"nixbld23|
00000070 22 3a 33 30 30 32 33 2c 22 6e 69 78 62 6c 64 31 |":30023,"nixbld1|
00000080 31 22 3a 33 30 30 31 31 2c 22 6e 69 78 62 6c 64 |1":30011,"nixbld|
00000090 31 32 22 3a 33 30 30 31 32 2c 22 c3 83 c2 b0 c3 |12":30012,".....|
@notpeelz
notpeelz / ie_drill.zs
Last active October 27, 2019 19:34
IE Drill Repair CraftTweaker Script
import crafttweaker.recipes.IRecipeFunction;
import crafttweaker.item.IIngredient;
import crafttweaker.item.IItemStack;
static drills as IItemStack[string] = {
steel: <immersiveengineering:drillhead:0>,
iron: <immersiveengineering:drillhead:1>
};
static stats as int[string][string] = {
@notpeelz
notpeelz / docsBuilder.lua
Last active May 20, 2018 09:35
Lua implementation of tostring(table) docs for OpenComputers
local serialization = require('serialization')
local serialize, deserialize = serialization.serialize, serialization.deserialize
local stringBuilder = require('stringBuilder')
local MAX_LINES = 10
local docsBuilder = {}
docsBuilder.MAX_LINES = MAX_LINES