Skip to content

Instantly share code, notes, and snippets.

View grammy-jiang's full-sized avatar
:octocat:
Do one thing, do it well

Grammy Jiang grammy-jiang

:octocat:
Do one thing, do it well
View GitHub Profile
#!/usr/bin/env bash
IMAGES="images"
PATTERN_RASPBERRY_PI_OS='\.\/images\/([0-9]{4}-[0-9]{2}-[0-9]{2})-(raspios)-([^-]*?)-(armhf)(-(full|lite)){0,1}\.zip'
PATTERN_UBUNTU='\.\/images\/ubuntu-[0-9.]*?-(preinstalled)-(desktop|server)-(arm64|armhf)\+raspi\.img\.xz'
PATTERN_OPENWRT='\.\/images\/openwrt-[0-9.]+-bcm27xx-bcm27[0-9]{2}-rpi(-[0-9])?-squashfs-factory\.img\.gz'
declare -A SUPPORT_OS
@grammy-jiang
grammy-jiang / trojan_database_management.md
Last active April 4, 2021 04:43
Trojan Database Management

Create the table of users_summary:

CREATE OR REPLACE TABLE users_summary
(
    id                INT       NOT NULL AUTO_INCREMENT PRIMARY KEY,
    user_id           INT       NOT NULL COMMENT 'the id in the table of users',
    created_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'the timestamp created this record',
    download          BIGINT UNSIGNED COMMENT 'the download in the table of users',
    upload            BIGINT UNSIGNED COMMENT 'the upload in the table of users',
    INDEX user_id__index (user_id) COMMENT 'the index of user_id',
@grammy-jiang
grammy-jiang / download_gitignore.sh
Last active June 28, 2025 05:44
git configurations
# Download the file:
wget --output-document .gitignore https://www.toptal.com/developers/gitignore/api/linux,windows,macos,vim,emacs,jetbrains+all,visualstudiocode,c,c++,go,java,node,python,rust,helm,bazel
@grammy-jiang
grammy-jiang / omniORB and omniORBpy.md
Last active August 3, 2023 05:24
omniORB and omniORBpy installation
  1. omniORB
foo@bar:~$ sudo dnf install openssl libzstd-devel
foo@bar:~$ ../configure --enable-thread-tracing --with-openssl=/usr/bin PYTHON=$HOME/.pyenv/shims/python
foo@bar:~$ make -j
foo@bar:~$ sudo make install
foo@bar:~$ omniidl -V
omniidl version 1.0
  1. omniORBpy