Skip to content

Instantly share code, notes, and snippets.

View hlwanghl's full-sized avatar

Hongliang Wang hlwanghl

View GitHub Profile
@hlwanghl
hlwanghl / dicts.policy
Created May 14, 2019 12:00
Elasticsearch File Policy
grant {
permission java.io.FilePermission "/data/elasticsearch/analysis/synonym.txt", "read";
};
@hlwanghl
hlwanghl / ddns.sh
Created May 25, 2016 00:40
A DDNS Bash script to refresh DNSPod.cn record according to always changing public IP.
#!/bin/bash
validateIp() {
oldIFS=$IFS
IFS=.
set -- $1
IFS=${oldIFS}
# Ensure there are 4 parts.
[[ "$#" -ne "4" ]] && exit 1