Skip to content

Instantly share code, notes, and snippets.

View soda92's full-sized avatar

Maple soda92

  • China, Beijing
  • 09:36 (UTC +08:00)
View GitHub Profile
@soda92
soda92 / denofresh_tailwind_upgrade_guide.md
Created July 3, 2026 00:40
Deno Fresh & Tailwind CSS Upgrade Guide

Deno Fresh & Tailwind CSS Upgrade Guide

This guide details the configuration updates and fixes applied to upgrade the Deno Fresh framework to v2.3.3 and migrate the styling pipeline to Tailwind CSS v4.


1. Deno Fresh 2.x Configuration Updates

A. Fluent File-Based Routing (main.ts)

In Fresh 2.x, fsRoutes is no longer imported and called as a standalone async function. Instead, it is invoked directly on the App instance:

@soda92
soda92 / firebase-hosting-merge.yml
Last active June 29, 2026 02:34
Fix firebase-tools@15.22.3 error (#17030)
name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@soda92
soda92 / shenwei_exam_update_decompiled.py
Created April 7, 2026 01:43
a decompiled version of shenwei exam update
# Decompiled with PyLingual (https://pylingual.io)
# Internal filename: '体检更新.py'
# Bytecode version: 3.12.0rc2 (3531)
# Source timestamp: 1970-01-01 00:00:00 UTC (0)
# ***<module>: Failure: Compilation Error
from __future__ import annotations
import argparse
import ast
import hashlib
@soda92
soda92 / script.js
Created June 15, 2025 09:28
DW learn German website fix
// ==UserScript==
// @name learngerman.dw.com
// @namespace http://tampermonkey.net/
// @version 2025-06-15
// @description try to take over the world!
// @author You
// @match https://learngerman.dw.com/en/**
// @icon https://www.google.com/s2/favicons?sz=64&domain=dw.com
// @grant none
// ==/UserScript==
@soda92
soda92 / CMakePresets.json
Last active February 16, 2025 07:18
windows clangd fix
{
"version": 10,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
// "$comment": "An example CMakePresets.json file",
// "include": [
// "otherThings.json",
@soda92
soda92 / gpg-import-and-export-instructions.md
Created November 29, 2024 06:49 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@soda92
soda92 / python-deco.md
Created November 28, 2024 09:49
how to add python-style decorator to my language

how to add python-style decorator to my language

I followed https://craftinginterpreters.com/functions.html and function call is implemented.

The interpreter can interpret block like this:

fun deco(func) {
  fun impl() {
    print "start" + func;
    func();
@soda92
soda92 / flip-cursor.md
Created November 28, 2024 09:47
convert mouse cursor image to left-handed (horizontally flip) using python

convert mouse cursor image to left-handed (horizontally flip) using python

Recently I find that Windows mouse cursor is not very friently for left-handed people. Because it point from right to left.

So I wonder if there is a way to change it to "left to right". I searched the internet but havnen't found one.

Further search give me a message that the "cur" file format is a derivation of the "ico" format: https://en.wikipedia.org/wiki/ICO_(file_format)

So I think if we can flip it programatically.

@soda92
soda92 / change-iso-open-prog.md
Created November 28, 2024 09:46
change back iso file's default open program in Windows 7

change back iso file's default open program in Windows 7

I change an iso file default open program to C:\Windows\explorer.exe , and I can't change it back. (Try this in virtual machine, not real computer.) How to change it? My OS is Windows 7.

Tried this, but after I change it, the .iso extension disappears from the list.

https://stackoverflow.com/questions/14543602/how-to-change-default-program-open-rar-file-which-select-open-file-by-explorer

I tried the registry, change Windows.IsoFile entry's shell->open value, and rebooted, but it didn't work, too

@soda92
soda92 / pyqt-error.md
Created November 28, 2024 09:45
PyQt webbrowser become a virus

PyQt webbrowser become a virus

I'm trying to combine backend and frontend.

I've created a frontend using PyQt webbrowser:

from PySide2.QtCore import *
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtWebEngineWidgets import *