Skip to content

Instantly share code, notes, and snippets.

View beerpiss's full-sized avatar
🗿
moyai

beerpsi beerpiss

🗿
moyai
View GitHub Profile
@beerpiss
beerpiss / 0.readme.md
Last active May 12, 2024 18:10
3simai
@beerpiss
beerpiss / convert.py
Last active November 8, 2022 01:38
converting a maimai FiNALE dump to simai charts
# SPDX-License-Identifier: 0BSD
# (c) beerpsi 2022
#
# Jank ass script to convert a maimai "classic" dump into simai charts.
#
# Requires imagemagick, ffmpeg and unxwb.
#
# Put this in the data folder, install maiconverter and pathvalidate,
# provide the encryption key (MiLK and FiNALE), then run.
@beerpiss
beerpiss / annotations.jq
Last active August 1, 2022 07:37
jq filter for generating github actions annotations from cargo check/cargo clippy
# SPDX-License-Identifier: 0BSD
# Usage: cargo clippy --message-format=json | jq --arg WORKING_DIRECTORY "$WORKDIR" -rsf annotations.jq
def annotation_level(x):
if x == "help" or x == "note" then
"notice"
elif x == "warning" then
"warning"
else
"error"
end;
@beerpiss
beerpiss / scraper.py
Created June 12, 2022 03:41
Scrapes Phigros chart constants from wikiwiki.jp/phigros
"""
[tool.poetry.dependencies]
python = "^3.8"
beautifulsoup4 = "^4.11.1"
requests = "^2.28.0"
XlsxWriter = "^3.0.3"
"""
from datetime import datetime
from bs4 import BeautifulSoup
import requests
@beerpiss
beerpiss / Cargo.toml
Last active July 10, 2022 23:35
batojs thingy
[package]
name = "fuck-batojs"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
aes = { version = "0.8", default-features = false }
@beerpiss
beerpiss / messenger-collapse-sidebar.js
Last active May 11, 2022 13:51
Left sidebar toggler for Facebook Messenger
// SPDX-License-Identifier: 0BSD
// ==UserScript==
// @name Collapse Facebook Messenger's sidebar
// @namespace messenger-collapse-sidebar
// @match https://www.messenger.com/*
// @version 0.1.2
// @author beerpsi
// @description Collapse and expand Messenger's left sidebar
// @downloadURL https://gist.githubusercontent.com/beerpiss/b873d8a21bb5af064cb08a47b9559aa5/raw/messenger-collapse-sidebar.js
// @updateURL https://gist.githubusercontent.com/beerpiss/b873d8a21bb5af064cb08a47b9559aa5/raw/messenger-collapse-sidebar.js
@beerpiss
beerpiss / register-irfanview.reg
Created April 29, 2022 01:17
(un)register irfanview as your image viewer if you use the portable version
Windows Registry Editor Version 5.00
; SPDX-License-Identifier: 0BSD
; IrfanView photo viewer registry
;
; Usage:
; $content = (Get-Content register-irfanview.reg).Replace('$IrfanViewBitness', $IrfanViewBitness) # either "32-bit" or "64-bit"
; .Replace('$IrfanViewBinary', $IrfanViewBinary) # either "i_view32.exe" or "i_view64.exe"
; .Replace('$pathIrfanViewEscaped', $pathIrfanView.Replace('\', '\\'))
; .Replace('$pathIrfanView', $pathIrfanView)
@beerpiss
beerpiss / enmity-theme.schema.json
Last active April 17, 2022 04:52
Enmity theme schema
{
"$schema": "http://json-schema.org/draft-07/schema",
"$comment": "https://github.com/compilekaiten/enmity-Themes-Color-Map",
"definitions": {
"hex_color": {
"type": "string",
"comment": "While Enmity does take #RRGGBBAA values, the alpha value is ignored when converting.",
"pattern": "#([0-9a-fA-F]{8}|[0-9a-fA-F]{6})"
},
"rgba_color": {
@beerpiss
beerpiss / nord.css
Created April 17, 2022 00:00
Nord CSS for Facebook Messenger
/* Copied from: https://github.com/ducfilan/Dark-mode-Franz-Ferdi */
:root,
.__fb-light-mode {
--card-background: #2e3440;
--comment-background: #3b4252;
--comment-footer-background: #3b4252;
--card-background-flat: #3b4252;
--disabled-button-background: #434c5e;
--divider: #3b4252;
@beerpiss
beerpiss / scrape-emojis.md
Last active April 14, 2022 11:51
Scraping emojis from Unicode's website into machine-readable JSON