Apache with CGI

Some notes for Apache CGI programs.

May 9, 2024 · 1 min · Mu Jiang

AutoHotkey with SSH

Use OpenSSH and Ncat to run AutoHotkey in Windows 10.

April 6, 2024 · 2 min · Mu Jiang

Build My Hugo Site

Some notes for building the blog with Hugo.

February 1, 2024 · 2 min · Mu Jiang

Download GitHub Latest Release

Introduction A shell script curl-github.sh to download the latest release of GitHub repositories. It needs curl and grep. usage: curl-github.sh [command] [repo] [keyword] commands: help, list, get. Script #!/bin/sh # download the latest release from github [ -n "$2" ] && REPO_PATH="$2" [ -n "$3" ] && KEYWORD="$3" [ -n "$4" ] && FILE_NAME="$4" [ -z "$REPO_PATH" ] && REPO_PATH="microsoft/vscode" [ -z "$KEYWORD" ] && KEYWORD="tarball" list() { echo $REPO_PATH curl -sL "https://api.github.com/repos/$REPO_PATH/releases/latest" | grep 'browser_download_url\|tarball_url\|zipball_url' | grep -o 'https:[^"]*' } get() { echo $REPO_PATH echo $KEYWORD URL=$(curl -sL "https://api.github.com/repos/$REPO_PATH/releases/latest" | grep 'browser_download_url\|tarball_url\|zipball_url' | grep -o 'https:[^"]*' | grep "$KEYWORD") echo $URL curl -LO "$URL" } help() { echo "usage: curl-github.sh [command] [repo] [keyword], commands: help, list, get." } CMD=$1 : ${CMD:='help'} $CMD P.S. grep -o 'https:[^"]*' If the first character of the list is the caret ‘^’, then it matches any character not in the list, and it is unspecified whether it matches an encoding error. Check the manual for details. ...

January 6, 2024 · 1 min · Mu Jiang

Tumbleweed with KDE or Xfce

Introduction My notes of smaug whose OS is openSUSE Tumbleweed with KDE Plasma and pina whose OS is openSUSE Tumbleweed with Xfce . Zypper Mirror Select the openSUSE mirror from tuna. sudo zypper mr -da sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/tumbleweed/repo/oss/' mirror-oss sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/tumbleweed/repo/non-oss/' mirror-non-oss sudo zypper ref Codecs sudo zypper ar -cfp 90 'https://mirrors.tuna.tsinghua.edu.cn/packman/suse/openSUSE_Tumbleweed/Essentials/' packman-essentials sudo zypper dup --from packman-essentials --allow-vendor-change Update sudo zypper dup --no-allow-vendor-change YaST Network Hostname/DNS → Static Hostname = ‘pina’ Boot Loader Bootloader Options → Timeout in Seconds = ‘1’ ...

September 25, 2023 · 3 min · Mu Jiang