Skip to content

Instantly share code, notes, and snippets.

View zjsxwc's full-sized avatar

Wang Chao zjsxwc

  • Shaoxing China
View GitHub Profile
@zjsxwc
zjsxwc / install-ibus-fcitx5-rime-zrm-input-method.txt
Last active July 6, 2023 08:33
archlinux 最简单的使用自然码双拼输入法的配置
fcitx5+rime的方案不稳定,我推荐使用ibus的方式
$ yay -S ibus ibus-sunpinyin sunpinyin ibus-pinyin
# ibus-pinyin 可以选择繁体字输入,sunpinyin可以自然码输入
$ cat ~/.xinitrc
#!/bin/bash
...
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
export GTK_IM_MODULE=ibus
@zjsxwc
zjsxwc / docker.md
Created May 2, 2023 04:16 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@zjsxwc
zjsxwc / nginx-cors.conf
Created July 7, 2022 04:35 — forked from algal/nginx-cors.conf
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
<?php
$list = [];
for ($i = 0; $i < 10; $i++) {
$obj = new \stdClass();
$list[] = $obj;
$obj->val = $i;
@zjsxwc
zjsxwc / arraysFullCombination.php
Created March 30, 2017 03:30
arraysFullCombination
<?php
$a1 = ["a","b","c"];
$a2 = ["i","j","o"];
$a3 = ["x","y","z"];
function arraysFullCombination() {
$arrays = func_get_args();