Skip to content

Instantly share code, notes, and snippets.

View redthing1's full-sized avatar

red thing redthing1

  • the eternal wonders of space
  • California
View GitHub Profile
@redthing1
redthing1 / speclock.sh
Created May 14, 2020 01:42
a better-looking lock script (based on betterlockscreen and i3lock)
#!/usr/bin/env bash
############
# SPEC-LOCK #
############
# fancy/special locking script
insidecolor=00000000
ringcolor=ffffffff
keyhlcolor=d23c3dff
@redthing1
redthing1 / README.md
Last active March 11, 2024 08:01
convert xresources colors to kitty

xres to kitty

a quick converter to convert Xresources format color definitions (from terminal.sexy) to Kitty's color configuration format.

usage: ./xres_to_kitty.py < xres_colors.txt >> ~/.config/kitty/kitty.conf

ideally, you would clear the existing previously generated colors from the kitty conf file before running.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@redthing1
redthing1 / bigmap.c
Created February 23, 2022 21:06
documented tonc big tilemap bigmap.c
#include <tonc.h>
#include "map.h"
#include "maps/bigmap.h"
#include "assets/pokemonMap.h"
#include "assets/Pal0.h"
#include "assets/Pal1.h"
#include "assets/Pal2.h"
#include "assets/Pal3.h"
#include "assets/Pal4.h"
#include "assets/Pal5.h"
@redthing1
redthing1 / wget-snapshotpage.md
Created October 23, 2022 01:38 — forked from dannguyen/wget-snapshotpage.md
Use wget to snapshot a page and its necessary visual dependencies

Use wget to mirror a single page and its visible dependencies (images, styles)

Money graphic via State of Florida CFO Vendor Payment Search

Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)

This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.

@redthing1
redthing1 / cycles_cuda_render.py
Created March 3, 2023 20:48
blender cycles CUDA render
import bpy
def enable_gpus(device_type, use_cpus=False):
preferences = bpy.context.preferences
cycles_preferences = preferences.addons["cycles"].preferences
cuda_devices, opencl_devices = cycles_preferences.get_devices()
if device_type == "CUDA":
devices = cuda_devices
@redthing1
redthing1 / cycles_accelerator.py
Created March 8, 2023 04:50
cycles accelerator
print("CYCLES ACCELERATOR SCRIPT")
import re
import bpy
scene = bpy.context.scene
scene.cycles.device = "GPU"
prefs = bpy.context.preferences
prefs.addons["cycles"].preferences.get_devices()
cprefs = prefs.addons["cycles"].preferences
@redthing1
redthing1 / README.md
Last active August 1, 2023 22:15
Download your time machine data from Solaris

Here's a tool to download Solaris time machine data.

Setup:

pip3 install typer requests

Usage:

python3 timemachine.py -e  -p  -g  -o 
@redthing1
redthing1 / library_injector.cpp
Created April 5, 2024 19:53 — forked from saagarjha/library_injector.cpp
Load a library into newly spawned processes (using DYLD_INSERT_LIBRARIES and EndpointSecurity)
// To compile: clang++ -arch x86_64 -arch arm64 -std=c++20 library_injector.cpp -lbsm -lEndpointSecurity -o library_injector,
// then codesign with com.apple.developer.endpoint-security.client and run the
// program as root.
#include <EndpointSecurity/EndpointSecurity.h>
#include <algorithm>
#include <array>
#include <bsm/libbsm.h>
#include <cstdint>
#include <cstdlib>