Skip to content

Instantly share code, notes, and snippets.

View mochaaP's full-sized avatar
🦜
I don't use Arch btw.

Zephyr Lykos mochaaP

🦜
I don't use Arch btw.
View GitHub Profile
@mochaaP
mochaaP / cqooc_login.py
Created September 10, 2022 04:50
重庆高校在线登陆并且获取课程列表
import requests,time,json,random,hashlib
class course():
def __init__(self,account,password):
self.account = account
self.password = password
self.connect = requests.session()
def Get_nonce(self):
url = 'http://www.cqooc.net/user/login?ts=' + str(round(time.time() * 1000))
nonce_text = self.connect.get(url=url)
nonce_json = nonce_text.json()
@mochaaP
mochaaP / tree-style-tabs.css
Last active September 13, 2022 16:18
Firefox Snippets
/* Less visible tab dividers.
A black border with a very low alpha slightly darkens any color. */
tab-item-substance {
border: solid 1px #00000012;
}
/* Change styling of pending (unloaded) tabs */
tab-item.discarded tab-item-substance {
opacity: 0.75;
}
@mochaaP
mochaaP / xcb-invis.cpp
Created September 14, 2022 07:13
x11 invisible window (for my i3 persistent workspace dirty workaround)
#include <xcb/xcb.h>
#include <xcb/xcb_ewmh.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <cstdlib>
#define PROGRAM "xcb-invis"
@mochaaP
mochaaP / README.md
Last active April 17, 2023 23:24
Lenovo ThinkPad X1 Carbon (Gen 7) tpacpi::kbd_backlight workaround

Usage

$ usermod -aG user input

add this script to autostart

Requirements

# 'Wine-to-rule-them-all' - Wine-TkG simple config file
##
## This config file contains the basic settings of your build.
## For deeper configuration, see wine-tkg-profiles/advanced-customization.cfg
##
#### NON-MAKEPKG OPTIONS (Won't affect makepkg builds) ####
# Set to the desired installation path for your build(s). A versioned dir containing your build will be created inside that target.
%global _hardened_build 1
%global _vpath_builddir build
%global commit 99a51102df25c4d9770e3c4943ff4f1487163c49
%global abbrev %(c=%{commit}; echo ${c:0:9})
%global ahead 48
Summary: Linux Steam Integration (LSI)
Name: linux-steam-integration
Version: 0.7.2~master.%{ahead}.g%{abbrev}
@mochaaP
mochaaP / Dockerfile
Created April 1, 2023 17:30
anisette server
FROM dadoum/anisette-server:latest AS app
FROM debian:unstable-slim AS base
ENV DEBIAN_INTERFACE=noninteractive
RUN apt-get update && apt-get install -y libcurl4
FROM base AS builder
WORKDIR /app
@mochaaP
mochaaP / ktk3_savefile.md
Created April 15, 2023 11:49
IWKTK3 savefile verification analysis

KTK3 savefile analysis

It's a bit frustrating when I Wanna Kill The Kamilia 3 (IWKTK3) savefile have some sort of machine-binding mechanism in place and I can't find any information about it. So here you go.

Fields

All the following fields are random numbers generated on first launch.

registry_set_root(0);
@mochaaP
mochaaP / types.d.lua
Last active August 3, 2023 15:29
Devilspie2's lua type annotation
---@meta devilspie2
-- SPDX-License-Identifier: 0BSD
-- If index = 0 then the ‘current’ monitor (with the window's centre point)
-- is used (falling back on then the first monitor showing part of the
-- window then the first monitor).
--
-- If index = -1 then all monitors are treated as one large virtual monitor.
--