Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

licheng mlicheng

🎯
Focusing
View GitHub Profile
@mlicheng
mlicheng / Activate Office 2019 for macOS VoL.md
Created Mar 31, 2021 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file
View Activate Office 2019 for macOS VoL.md

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@mlicheng
mlicheng / docker
Last active Apr 1, 2021
docker env for kibana
View docker
// delete images which tag is none
docker rmi $(docker images | grep "none" | awk '{print $3}')
// docker env for kibana config
"Env": [
"PATH=/usr/share/kibana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"ELASTIC_CONTAINER=false",
"ELASTICSEARCH_HOSTS=http://127.0.0.1:8812"
]
View gist:a5b0d532ffc334633b2239680e45be13
function drips(){
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.IPAddress }} {{ .Name }}' | sed 's/ \// /'
}
View clash.yaml
#---------------------------------------------------#
## 配置文件需要放置在 $HOME/.config/clash/config.yml
##
## 如果您不知道如何操作,请参阅 SS-Rule-Snippet 的 Wiki:
## https://github.com/Hackl0us/SS-Rule-Snippet/wiki/clash(X)
## from: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/LAZY_RULES/clash.yaml
#---------------------------------------------------#
# HTTP 代理端口
port: 7890
@mlicheng
mlicheng / mongodb
Created Mar 11, 2021
mongodb find by array element type
View mongodb
db.getCollection("collection_name").find({
"filed_name": {
$elemMatch: {
$ne: null,
$type: "string" // object, objectId ...
}
}
}, {
"filed_name": 1
})
@mlicheng
mlicheng / dnsmasq.conf
Created Feb 6, 2021
dnsmasq config with ad statistic block
View dnsmasq.conf
## /usr/local/etc/dnsmasq.conf
listen-address=127.0.0.1
# nameserver 119.29.29.29
# nameserver 223.5.5.5
# nameserver 1.1.1.1
# nameserver 114.114.114.114
# statistic
address=/bshare.cn/0.0.0.0
address=/bashare.cn/0.0.0.0
@mlicheng
mlicheng / examples.md
Created Aug 15, 2020 — forked from ErisDS/examples.md
Ghost Filter Query examples
View examples.md

Filter Queries - Example Use Cases

Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)

Fetch 3 posts with tags which match 'photo' or 'video' and aren't the post with id 5.

api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});

GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3