Skip to content

Instantly share code, notes, and snippets.

View alswl's full-sized avatar

Jingchao Di alswl

View GitHub Profile
@alswl
alswl / hosts
Last active November 12, 2023 11:17
(deprecated, I bought xiaomi VIP)hosts for OpenWRT, for disable AD in xiaomi TV
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 sdkconfig.ad.xiaomi.com
127.0.0.1 ad.mi.com
127.0.0.1 ad.xiaomi.com
127.0.0.1 ad1.xiaomi.com
127.0.0.1 adv.sec.miui.com
127.0.0.1 test.ad.xiaomi.com
127.0.0.1 new.api.ad.xiaomi.com
@alswl
alswl / repositories
Last active August 8, 2023 01:16
sbt repositories in China(mirror)
[repositories]
local
huaweicloud-ivy: https://mirrors.huaweicloud.com/repository/ivy/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
huaweicloud-maven: https://mirrors.huaweicloud.com/repository/maven/
bintray-typesafe-ivy: https://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
bintray-sbt-plugins: https://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
# aliyun not works for ivy
# aliyun-ivy: https://maven.aliyun.com/repository/public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
# aliyun-public-mirror: https://maven.aliyun.com/repository/public/
@alswl
alswl / .github.test.com.htpasswd
Last active March 28, 2023 06:55
Simple proxy on Nginx for Github(and Github user content)
# /etc/nginx/.github.test.com.htpasswd
# htpasswd -nb user password
# PLEASE USE YOUR OWN PASSWORD
user:$apr1$zv2GRYuf$vknySgxsj3DfOav6cdRCv.
@alswl
alswl / app.c
Last active October 12, 2021 15:33
app.c for zyy
#include <stdio.h>
int main(int argc, char const *argv[])
{
int count;
double input, output;
// 0. prepare count
scanf("%d", &count);
printf("count: %d\n", count);
@alswl
alswl / Jenkinsfile
Created July 23, 2021 15:48
Jenkinsfile for Python project with Chinese mirror, lint and versioned virtual env
pipeline {
agent {
docker {
image 'python:latest'
args '-v /var/lib/jenkins/caches/pipcache:/var/lib/jenkins/caches/pipcache -v /var/lib/jenkins/caches/durable-task:/var/lib/jenkins/caches/durable-task'
}
}
environment {
CI_PROJECT_DIR = '/var/lib/jenkins'
@alswl
alswl / Makefile
Created December 8, 2020 06:51
general makefile for golang project, via https://github.com/caicloud/golang-template-project
# Copyright 2019 The Caicloud Authors.
#
# The old school Makefile, following are required targets. The Makefile is written
# to allow building multiple binaries. You are free to add more targets or change
# existing implementations, as long as the semantics are preserved.
#
# make - default to 'build' target
# make lint - code analysis
# make test - run unit test (or plus integration test)
# make build - alias to build-local target
@alswl
alswl / 现代汉语常用词表.txt
Created September 18, 2019 07:37 — forked from indiejoseph/现代汉语常用词表.txt
现代汉语常用词表
This file has been truncated, but you can view the full file.
阿爸 a1'ba4 18137
阿昌族 a1'chang1'zu2 50849
阿斗 a1'dou3 42632
阿飞 a1'fei1 48603
阿富汗 a1'fu4'han4 3461
阿訇 a1'hong1 34432
阿拉伯数字 a1'la1'bo2'shu4'zi4 35937
阿拉伯语 a1'la1'bo2'yu3 30476
阿妈 a1'ma1 16220
阿门 a1'men2 47913
@alswl
alswl / luna_pinyin.emoji.apple.dict.yaml
Last active January 11, 2020 03:03
(deprecated) emoji pinyin mapping for Rime input. data from MacOS(鼠须管、小狼毫、中州韵配置,将 MacOS 数据导入)PS:sierra 之后的数据格式发生变化,未更新,比如没有培根 🥓。新版 Emoji(支持到 Emoji 12.0)可以见更完整的 Rime 配置 https://github.com/alswl/Rime
# luna_pinyin.emoji.apple.dict.yaml by alswl
# encoding: utf-8
---
name: luna_pinyin.emoji.apple
version: "2016.12.28"
sort: by_weight
use_preset_vocabulary: true
...
@alswl
alswl / command.sh
Created June 21, 2019 02:33
macOS codesign
codesign --entitlements gdb-entitlement.xml -fs gdbc /usr/local/Cellar/cgdb/0.7.0_1/bin/cgdb
codesign --entitlements gdb-entitlement.xml -fs gdbc /usr/local/Cellar/gdb/8.3/bin/gdb
local ret_status="%(?:%{$fg_bold[green]%}$:%{$fg_bold[red]%}$)"
PROMPT='%{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)${ret_status}%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"