Skip to content

Instantly share code, notes, and snippets.

@ipcjs
ipcjs / api_result.dart
Created June 15, 2021 02:40
Dio: ApiResultInterceptor
class ApiResult<T> {
final int code;
final T data;
final String? message;
const ApiResult({
required this.code,
required this.data,
this.message,
});
@ipcjs
ipcjs / split_color.py
Created February 18, 2025 08:20
Decomposes a merged image, extracting the foreground based on a background image and a specified source RGB color.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
from typing import Dict, List, Tuple
# pip install Pillow
from PIL import Image
@ipcjs
ipcjs / +Windows 10 Add Copy-Paste as Symbolic Link or Junction.md
Last active August 2, 2024 08:35 — forked from ndunks/paste-symlink.ps1
Windows 10 Add Copy-Paste as Symbolic Link or Junction
@ipcjs
ipcjs / +Rime+小鹤双拼+颜文字+笔画混合输入方案.md
Last active March 8, 2024 07:03
Rime+小鹤双拼+颜文字+笔画混合输入方案

Rime+小鹤双拼+颜文字+笔画混合输入方案

概述

方案配置文件+详细说明:Rime+小鹤双拼+颜文字+笔画混合输入方案

实现的功能是:给小鹤双拼添加颜文字支持,直接打双拼出颜文字,支持模糊音,支持词频调整,同时不影响小鹤双拼自带的笔画反查。

要实现双拼+颜文字的功能网上已经有很多方法,但都有些弊端,这里分别简单介绍下:

@ipcjs
ipcjs / vf_sub.lua
Last active October 26, 2023 18:46
支持通过快捷键,装载滤镜型次字幕的mpv脚本
--[[
SOURCE_ https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autoload.lua
COMMIT_ 3ba446d0b065f867ca262a2e05e4e8d24c7c0783
SOURCE_ https://github.com/rossy/mpv-open-file-dialog/blob/master/open-file-dialog.lua
COMMIT_ 04fe818fc703d8c5dcc3a6aabe1caeed8286bdbb
文档_ https://github.com/hooke007/MPV_lazy/discussions/106
示例:在 input.conf 中另起写入下列内容
Ctrl+Alt+1 script-binding vf_sub/append_vfSub # 装载次字幕(滤镜型)
Ctrl+Alt+2 script-binding vf_sub/append_vfSub_2 # 装载文件中的第2个字幕(滤镜型)
@ipcjs
ipcjs / karabiner.rules.json
Last active January 5, 2023 05:35
ipcjs's Karabiner Custom Rules
{
"title": "@ipcjs's Karabiner Custom Rules",
"rules": [
{
"description": "Cmd(+Shift)+Home/End => Cmd(+Shift)+Up/Down (Jump to Start/End on Chrome's Page)",
"manipulators": [
{
"conditions": [
{
"type": "frontmost_application_if",
@ipcjs
ipcjs / vue-attributes-for-webstorm.txt
Last active December 21, 2022 05:57
Vue attributes for WebStorm
:checked
:class
:click
:disabled
:for
:id
:name
:readonly
:style
:title
@echo off
setlocal enabledelayedexpansion
rem Generated by JetBrains Toolbox 1.25.12627 at 2022-09-07T17:07:44.532710200
rem force use c:\github\@flutter, @see: https://github.com/flutter/flutter/issues/105395
set "old_dir=%cd%"
if /i "%cd:~0,18%" == "k:\github\@flutter" (
cd /d %cd:k:\github=c:\github%
echo switch work dir from %old_dir% to !cd!...
)
{
"categories": [
{
"title": "## 🚀 Features",
"labels": [
"feature",
"feat"
]
},
{
@ipcjs
ipcjs / deps_hook.gradle
Created April 12, 2022 15:12
尝试移除插件的原生代码=>不行,Flutter注册插件的时候会报错(
/**
* Hook <a href="https://github.com/flutter/flutter/blob/c8538873c80e34231d7a93f9ca1e5ec22c8804b1/packages/flutter_tools/gradle/flutter.gradle#L385">这个方法调用</a>
* 将`compileOnlyProjects`中指定的依赖改成通过`compileOnly`来依赖, 达到让插件类不被编译的目的!
* */
class ProjectMetaClass extends DelegatingMetaClass {
ProjectMetaClass(MetaClass metaClass) { super(metaClass) }
Object invokeMethod(Object object, String name, Object[] args) {
if (name == 'dependencies' && args.length == 1 && args[0] instanceof Closure) {
// println("project=>$name: $args")