Skip to content

Instantly share code, notes, and snippets.

View jiahut's full-sized avatar
🎯
Focusing

zhijia,.zhang jiahut

🎯
Focusing
View GitHub Profile
@echo off
REM dns-updater.cmd - Windows wrapper to run dns-updater.bundle.js with bun
REM Usage: dns-updater.cmd [args]
REM Determine the directory of this script
set SCRIPT_DIR=%~dp0
REM Execute the bundled script using bun
bun "%SCRIPT_DIR%dns-updater.js" %*
This file has been truncated, but you can view the full file.
#!/usr/bin/env node
import { createRequire } from 'module'; const require = createRequire(import.meta.url); globalThis.__filename = require('url').fileURLToPath(import.meta.url); globalThis.__dirname = require('path').dirname(globalThis.__filename);
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
#!/usr/bin/env bash
set -euo pipefail
# markservman: 管理 markserv 服务的工具
# Usage: markservman {install|start|stop|status|logs}
action=${1:-}
case "$action" in
install)
echo "Installing markserv globally using bun..."
bun install -g markserv
#!/bin/sh
':' //; exec "$(command -v bun || command -v node)" "$0" "$@"
var vZ=Object.create;var{getPrototypeOf:PZ,defineProperty:GG,getOwnPropertyNames:_Z}=Object;var EZ=Object.prototype.hasOwnProperty;var XG=(A,Q,I)=>{I=A!=null?vZ(PZ(A)):{};let J=Q||!A||!A.__esModule?GG(I,"default",{value:A,enumerable:!0}):I;for(let $ of _Z(A))if(!EZ.call(J,$))GG(J,$,{get:()=>A[$],enumerable:!0});return J};var cA=(A,Q)=>()=>(Q||A((Q={exports:{}}).exports,Q),Q.exports);var EA=import.meta.require;var CI=cA((gZ)=>{class _J extends Error{constructor(A,Q,I){super(I);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=Q,this.exitCode=A,this.nestedError=void 0}}class CG extends _J{constructor(A){super(1,"commander.invalidArgument",A);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}gZ.CommanderError=_J;gZ.InvalidArgumentError=CG});var uI=cA((hZ)=>{var{InvalidArgumentError:yZ}=CI();class ZG{constructor(A,Q){switch(this.description=Q||"",this.variadic=!1,this.parseA
@jiahut
jiahut / config.toml
Created March 11, 2024 03:48
配置 helix 作为 vim 的最小实现
[editor]
auto-info = false
[keys.normal]
# Quick iteration on config changes
# C-o = ":config-open"
# C-r = ":config-reload"
";" = "repeat_last_motion"
@jiahut
jiahut / SimpleHTTPServerWithUpload.py
Created November 24, 2023 03:33 — forked from touilleMan/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@jiahut
jiahut / shadowsocks-rust-server.sh
Created July 23, 2023 11:45 — forked from gpchelkin/shadowsocks-rust-server.sh
How to Setup shadowsocks-rust Server with v2ray-plugin or xray-plugin on Any Linux Host
#!/usr/bin/env bash
# https://github.com/shadowsocks/shadowsocks-rust/releases
export SSVERSION=v1.15.4
export SSPORT=143
export SSPASSWORD="CHANGEME"
export SSARCHIVE="shadowsocks-${SSVERSION}.x86_64-unknown-linux-gnu.tar.xz"
#export SSARCHIVE="shadowsocks-${SSVERSION}.aarch64-unknown-linux-gnu.tar.xz"
export PREFIX=/usr/local/bin
@jiahut
jiahut / vim_cheatsheet.md
Created January 13, 2022 08:08 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close

editor-mode

motion-mode

conceptkeyvim implemacs impl
snipes
matchit%matchup
jump<SPC>ojeasymotionavy
gotogf
@jiahut
jiahut / xmodmap.sh
Created January 5, 2021 10:06
linux modify keyboard to hhkb style
#!/bin/sh
/usr/bin/setxkbmap -option "ctrl:nocaps"
/usr/bin/xmodmap -e "keycode 51 = BackSpace"
/usr/bin/xmodmap -e "keycode 22 = backslash bar"