Skip to content

Instantly share code, notes, and snippets.

@allex
allex / gist:11203573
Last active December 5, 2023 07:27
Ubuntu 安装中文字体

环境 (Environment)

版本:Ubuntu 14.04 LTS 默认语言:English(United States)

安装 (Setup)

Debian 和 Ubuntu 下对中文支持比较好的字体有: fonts-droid、ttf-wqy-zenhei 和 ttf-wqy-microhei 等,除了文泉驿系列字体外,比较流行的免费中文字体还有文鼎提供的楷体和上海宋,包名分别是: fonts-arphic-ukai 和 fonts-arphic-uming。

--[[ ngx-helper.lua
author: Allex Wang (https://iallex.com/)
## ngx helper
get_var_names() - get variable names
## tools
@allex
allex / update-v2ray-geo.sh
Last active July 14, 2023 07:00 — forked from maddie/update-v2ray-geo.sh
Script for updating V2Ray geoip.dat and geosite.dat on OpenWRT
#!/bin/sh
# GistID: 12011d02da2e8b605a6cb715debb35f8
# GistURL: https://gist.github.com/allex/12011d02da2e8b605a6cb715debb35f8
LOGGER_TAG=v2ray-geodata-updater
log () {
echo "$@"
logger -t $LOGGER_TAG -- "$@"
@allex
allex / remotessh.go
Created July 4, 2023 06:02 — forked from tobgu/remotessh.go
Remote ssh exec using Go
package main
import (
"bufio"
"fmt"
"golang.org/x/crypto/ssh"
"io"
"log"
"os"
"strconv"
#!/usr/bin/env bash
set -eu
# buildbox-cli agent
# by @allex <iallex.com> | MIT
#
# Install
# curl -sSLf https://git.io/fpWaM -o /usr/sbin/buildbox-cli-agent && chmod +x /usr/sbin/buildbox-cli-agent
#
# GistID: 7dd3f33104c2c0c01e7a666ef412e0fa
#!/bin/bash
# Personal bash PS1 by @allex_wang (https://iallex.com/) {{{
# Last Modified: Mon May 08, 2023 14:22
# GistID: a7c062df0aba27c631aa92971ea83850
# GistURL: https://gist.github.com/a7c062df0aba27c631aa92971ea83850
{
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-256color | xterm-color) color_prompt=yes;;
#!/bin/sh
set -eu
# Export and bundle docker image to local (both linux/amd64(x86), linux/arm64)
# by @allex_wang <https://iallex.com> | MIT
#
# Usage:
# bundle-image.sh <SOURCE_IMAGE_URL> <TARGET_IMAGE_NAME>
#
# For remote invoke:
@allex
allex / curl-api
Last active February 13, 2023 08:58
#!/bin/bash
# vim: set ft=sh fdm=marker ts=2 sw=2 sts=2 tw=85 et:
set -euEo pipefail
# ================================================
# Description: #{$Description}
#
# Usage:
# curl-api [-h, --json <JSON>, --parse-token <TOKEN_NAME>]
#
@allex
allex / pushimage.sh
Last active February 10, 2023 09:48
#!/bin/bash
# vim: set ft=sh fdm=manual ts=2 sw=2 sts=2 tw=85 et:
# ================================================
# Description: spush docker images to remote
# Last Modified: Thu Feb 02, 2023 14:52
# Author: Allex Wang (allex.wxn@gmail.com)
# GistID: 42f93720be61ec33c0542855f5a0f543
# GistURL: https://gist.github.com/42f93720be61ec33c0542855f5a0f543
# ================================================
@allex
allex / GNU-Make.md
Created February 3, 2023 10:47 — forked from rueycheng/GNU-Make.md
GNU Make cheatsheet