Skip to content

Instantly share code, notes, and snippets.

@perillamint
perillamint / monado-wmr-steamvr.patch
Last active September 8, 2024 20:33
Dirty hack to let Monado initialize SteamVR and WMR (or any other HMD) together with MoToC.
diff --git a/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp b/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
index 89d2f7aca..51aec6866 100644
--- a/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
+++ b/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
@@ -816,15 +816,15 @@ steamvr_lh_create_devices(struct xrt_system_devices **out_xsysd)
}
U_LOG_IFL_I(level, "Device search time complete.");
- if (out_xsysd == NULL || *out_xsysd != NULL) {
+ if (out_xsysd == NULL) { // || *out_xsysd != NULL) {
@perillamint
perillamint / .env
Last active July 8, 2023 03:59
SiFNet Mastodon deployments
MASTODON_IMAGE=ghcr.io/cybersiliconforest/mastodon
MASTODON_TAG=latest
@perillamint
perillamint / exif-toot.sh
Created April 22, 2023 16:33
Toot picture with EXIF information!
#!/bin/bash
set -e
# CONFIG ZONE
MASTODON_INSTANCE="social.silicon.moe"
MASTODON_AUTH_TOKEN="[REDACTED]"
FILE="$1"
if [ ! -f "$FILE" ]; then
@perillamint
perillamint / mastodon.conf
Created December 3, 2022 16:54
Mastodon docker nginx
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
@perillamint
perillamint / montecarlo.js
Last active August 2, 2022 06:15
Gacha of Monte Carlo (Genshin Impact ver.)
/*
* MIT No Attribution
*
* Copyright 2022 perillamint
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so.
@perillamint
perillamint / huawei.js
Created September 26, 2020 03:14
Huawei WebUI unlocker
// ==UserScript==
// @name Huawei Hidden settings
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Huawei WebUI unlocker
// @author perillamint
// @match http://192.168.8.1/*
// @grant none
// @license GPL-3.0
// ==/UserScript==
@perillamint
perillamint / tossqr.sh
Created August 12, 2019 18:23
Toss QR code generator
#!/bin/bash
BANK='한국은행'
ACCNO='0011337'
AMOUNT='1337'
urlencode() {
python3 -c "import urllib.parse; print (urllib.parse.quote('''$1'''))"
}
@perillamint
perillamint / dumpcode.c
Created July 11, 2019 06:19
Dumpcode for Android JNI
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <android/log.h>
#define PRINTBUFSZ 512
#define REMAINBUFSZ(start, end) PRINTBUFSZ - (end - start)
#define PRINTLN(...) __android_log_print(ANDROID_LOG_INFO, "FUCKING HEXDUMP", "%s\n", __VA_ARGS__)
#define PRINTBUF(printbuf, printbufptr) PRINTLN(printbuf); printbufptr = printbuf

Keybase proof

I hereby claim:

  • I am perillamint on github.
  • I am perillamint (https://keybase.io/perillamint) on keybase.
  • I have a public key ASBWU6GKoOHncbQcx1x6eLvLa5cXSIIM0rGVWwf340Z52Qo

To claim this, I am signing this object: