Skip to content

Instantly share code, notes, and snippets.

View soda92's full-sized avatar

Maple soda92

  • China, Beijing
  • 08:46 (UTC +08:00)
View GitHub Profile
@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 / package-cpp.md
Created November 28, 2024 09:42
package C++ application
@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
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 / 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
@soda92
soda92 / 1.md
Created November 13, 2024 03:47
PYPI package uninstall issue
@soda92
soda92 / error.txt
Created November 5, 2024 08:06
Tebaco errors
[ 53%] Building CXX object test/CMakeFiles/core-test.dir/core-test.cc.obj
CMake Error at C:/Users/fts-guest-05600/.tebako/deps/src/_dwarfs_wr/deps/lib/cmake/gflags/gflags-config.cmake:107 (message):
Your gflags installation does not contain a gflags_nothreads_static library
target! Try a different combination of GFLAGS_SHARED and GFLAGS_NOTHREADS.
Call Stack (most recent call first):
CMakeLists.txt:82 (find_package)
@soda92
soda92 / swap_mouse.ps1
Created October 31, 2024 02:15
Swap mouse button, put this in $profile
# PowerShell script to swap mouse buttons for left-handed mouse users.
# (Make right mouse button the primary button...)
$swapButtons = Add-Type -MemberDefinition @'
[DllImport("user32.dll")]
public static extern bool SwapMouseButton(bool swap);
'@ -Name "NativeMethods" -Namespace "PInvoke" -PassThru
function swapleft {
@soda92
soda92 / covert.md
Created October 10, 2024 14:02
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.

Currently I can use these steps to modify one image:

@soda92
soda92 / settings.json
Last active October 10, 2024 13:48
How to set rust-analyzer extension to use MSYS2 environment in VSCode
{
"rust-analyzer.server.extraEnv": {
"PATH": "C:/msys64/ucrt64/bin"
},
"terminal.integrated.profiles.windows": {
// ...
"MSYS2": {
"path": "C:\\msys64\\usr\\bin\\fish.exe",
"args": [
"--login",