Skip to content

Instantly share code, notes, and snippets.

@holmeszyx
holmeszyx / mintupg.py
Created April 29, 2024 08:16
oh-my-rime one-key upgrade
import urllib.request
import zipfile
import os
import urllib
import shutil
UPG_URL = "https://github.com/Mintimate/oh-my-rime/archive/refs/heads/main.zip"
SAVE_TMP = "mint-main.zip"
MINT_ZIP_PREFIX = "oh-my-rime-main"
@holmeszyx
holmeszyx / WebView.kt
Created January 28, 2024 08:42
Compose View
package xyz.imzyx.nextdemo.ui.comp
import android.webkit.WebChromeClient
import android.webkit.WebView
import android.webkit.WebViewClient
import android.widget.FrameLayout
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
@holmeszyx
holmeszyx / .bashrc
Created August 14, 2018 05:52 — forked from copperlight/.bashrc
Window Subsystem for Linux ssh-agent Configuraton
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
@holmeszyx
holmeszyx / c_blue.wsd
Last active June 25, 2018 08:05
PlantUrml theme. Modify from vscode PlantUML plugin. sytle/blue.wsd
scale 1.2
skinparam {
Default {
Font {
Name Noto Sans CJK SC
}
}
shadowing false
backgroundColor White
@holmeszyx
holmeszyx / go.json
Created April 17, 2017 09:39
VS code snippets
{
/*
// Place your snippets for Go here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
@holmeszyx
holmeszyx / blocked
Last active April 14, 2017 01:54
Cow block list. (at ~/.cow/blocked)
dropbox.com
google.com
ppa.launchpad.net
archive.canonical.com
github.com
pypi.python.org
amazonaws.com
jcenter.bintray.com
maven.org
fabric.io
@holmeszyx
holmeszyx / ssh-add.sh
Created February 13, 2017 08:49
auto import ssh keys. ignore request password every time.
#!/bin/sh
# saveing file at ~/.config/autostart/, let's it startup on system logined.
export SSH_ASKPASS="/usr/bin/ksshaskpass"
ssh-add < /dev/null
@holmeszyx
holmeszyx / config_client.json
Last active February 25, 2017 15:20
KCP config file
{
"localaddr": "127.0.0.1:1090",
"remoteaddr": "server:3389",
"key": "",
"crypt": "salsa20",
"mode": "fast",
"conn": 1,
"autoexpire": 60,
"mtu": 1200,
"sndwnd": 1024,
@holmeszyx
holmeszyx / mirros.md
Last active August 9, 2018 07:10
Maven mirro

###aliyun

        maven { url 'https://maven.aliyun.com/repository/public' }

完整

buildscript {
 repositories {
@holmeszyx
holmeszyx / apt_full_qt.md
Last active January 7, 2017 03:01
apt install full qt

参考 What's the development package for Qt5 in 14.04

Qt 的开发

sudo apt-get install qtdeclarative5-dev

Qt的全包

sudo apt-get install \
qtconnectivity5-dev qtbase5-dev qtbase5-dev qtbase5-dev qttools5-dev qttools5-dev qtbase5-dev qttools5-dev qtmultimedia5-dev qtbase5-dev qtconnectivity5-dev libqt5opengl5-dev qtpositioning5-dev qtbase5-dev qtdeclarative5-dev qtdeclarative5-dev qtdeclarative5-dev qtdeclarative5-dev qtdeclarative5-dev qtscript5-dev qtscript5-dev libqt5serialport5-dev qtbase5-dev libqt5svg5-dev qtbase5-dev qttools5-dev libqt5webkit5-dev libqt5websockets5-dev qtbase5-dev libqt5x11extras5-dev qtbase5-dev libqt5xmlpatterns5-dev