Skip to content

Instantly share code, notes, and snippets.

View soda92's full-sized avatar

Maple soda92

  • China, Beijing
  • 13:27 (UTC +08:00)
View GitHub Profile
@soda92
soda92 / 1.md
Created November 13, 2024 03:47
PYPI package uninstall issue
@soda92
soda92 / commit-message-guidelines.md
Created November 16, 2024 02:00 — forked from robertpainsi/commit-message-guidelines.md
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
targets := prog.exe my_library.dll my_plugin.dll
CXX := g++
CXXFLAGS := -c -g -O0 -MMD -pedantic -Wall -Wextra -Wconversion -Wno-unused -Wno-unused-parameter -Werror -Wfatal-errors -UNDEBUG -std=c++17 -Wno-missing-braces -Wno-sign-conversion
all: $(targets)
.PHONY: all
%.dll: %.o
@soda92
soda92 / GPG-FIX.md
Created November 27, 2024 08:33 — forked from mjul/GPG-FIX.md
gpg: signing failed: Inappropriate ioctl for device

Fixing GPG "Inappropriate ioctl for device" errors

6th November 2016 Linux 24 Comments https://d.sb/B5N 
    Error: gpg: using "D5673F3E" as default secret key for signing 
    Error: gpg: signing failed: Inappropriate ioctl for device 
    Error: gpg: [stdin]: sign+encrypt failed: Inappropriate ioctl for device
@soda92
soda92 / package-cpp.md
Created November 28, 2024 09:42
package C++ application
@soda92
soda92 / vue-error.md
Created November 28, 2024 09:44
Vue `v-if` and `ref` build error: Property 'value' does not exist on type 'boolean'. Did you mean 'valueOf'?

Vue v-if and ref build error: Property 'value' does not exist on type 'boolean'. Did you mean 'valueOf'?

I've created a simple vue page with the code below: Vue link

however, when building, I've got an error: Property 'value' does not exist on type 'boolean'. Did you mean 'valueOf'?

I've tried to change "

@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 *
@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 / 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 / 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();