Skip to content

Instantly share code, notes, and snippets.

View lifning's full-sized avatar
💜

liffy lifning

💜
View GitHub Profile
@NoraCodes
NoraCodes / delchosts.sh
Created June 6, 2023 01:20
Script to delete your chosts (Cohost posts) one page at a time
# You have to go into devtools and pull out your Cookie: header including the part that says Cookie:
# and replace YOUR COOKIE HEADER with that
# and replace YOUR PROJECT NAME in two places
for item in $(curl https://cohost.org/api/v1/project/YOUR PROJECT NAME/posts | jq ".items[] | objects | .postId"); do
curl 'https://cohost.org/api/v1/trpc/posts.delete?batch=1' \
-X POST -H 'content-type: application/json' \
-H 'Origin: https://cohost.org' \
-H 'YOUR COOKIE HEADER' \
--data-raw \{\"0\":\{\"projectHandle\":\"YOUR PROJECT NAME\",\"postId\":$item\}\}
done
@InvoxiPlayGames
InvoxiPlayGames / ppcasm.h
Created May 4, 2022 22:06
PowerPC assembly opcode macros for C
/*
ppcasm.h by InvoxiPlayGames, 2021
WTFPL License
*/
#include <stdint.h>
// Poke values
#define POKE_8(addr, val) do { *(uint8_t*)(addr) = (uint8_t)(val); } while (0)
#define POKE_16(addr, val) do { *(uint16_t*)(addr) = (uint16_t)(val); } while (0)
Description: Disable xfce manipulation of xrandr
This disables all(?) xfce manipulation of XRANDR settings. Instead,
the settings can be manipulated by commandline.
.
e.g.,
.
xrandr --output DisplayPort-0 --right-of HDMI-A-0 --fb 5120x1440
.
This is a heavy-handed approach but it fixes problems for me when
power-management causes monitors to "appear" and "disappear".
@mcspring
mcspring / Makefile
Created June 26, 2018 07:36
Static build of nginx with custom openssl, pcre and zlib
# Author: Eric Pruitt (http://www.codevat.com)
# License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
# Description: This Makefile is designed to create a statically linked nginx
# binary without any dependencies on the host system's version of glibc.
NGINX_VERSION=1.15.0
OPENSSL_VERSION=1.0.2o
PCRE_VERSION=8.42
ZLIB_VERSION=1.2.11
@Stewmath
Stewmath / .xbindkeysrc
Last active June 28, 2022 08:26
Livesplit global hotkeys workaround
# Livesplit hotkeys
#
"livesplithk Page_Up"
Page_Up
"livesplithk Page_Down"
Page_Down
"livesplithk Insert"
Insert
"livesplithk Delete"
Delete