Skip to content

Instantly share code, notes, and snippets.

@holmeszyx
holmeszyx / share-oh-my-zsh.sh
Created August 29, 2025 08:23
share oh my zsh configuration environment from root user to other normal user.
#!/bin/bash
# share-oh-my-zsh.sh - Share oh-my-zsh configuration from root to another user
# Usage: share-oh-my-zsh.sh [target_user] [--backup]
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
@holmeszyx
holmeszyx / ln-nvim.sh
Last active March 24, 2025 08:56
bind nvim configurations
BASE_HOME=/home/ubuntu
if [ ! -d ~/.config ]; then
mkdir -p ~/.config
fi
if [ ! -d ~/.local/state ]; then
mkdir -p ~/.local/state
fi
if [ ! -d ~/.local/sharevim ]; then
mkdir -p ~/.local/share
@holmeszyx
holmeszyx / EdgeToEdge.kt
Created November 29, 2024 10:12
Standalone uitlity class, compatable with older versions Androidx. Copy it to androidx.activitycompat package to avoid conflicts.
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@holmeszyx
holmeszyx / swith-java.ps1
Last active March 26, 2025 08:50
Swith java version in PowerShell. Saving the script and Appending '. "C:\Path\To\Your\Script\switch-java.ps1"' to "$PROFILE" file
function Switch-Java {
param (
[string]$Version
)
# The location of multi-version java
$javaPaths = @{
"8" = "C:\Programs\dev\java\java"
"11" = "C:\Programs\dev\java\java11"
"17" = "C:\Programs\dev\java\java17"
@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"
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@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