This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<script> | |
function is_ascii(str) { | |
return /^[\x00-\x7F]*$/.test(str); | |
} | |
function is_seperator(c) { | |
return [" ", ",", "。", ",", ";", ",", "?", ".", "?", ";", "《", "》"].indexOf(c) > -1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<script> | |
function is_ascii(str) { | |
return /^[\x00-\x7F]*$/.test(str); | |
} | |
function is_seperator(c) { | |
return [" ", ",", "。", ",", ";", ",", "?", ".", "?", ";", "《", "》"].indexOf(c) > -1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[OSEv3:children] | |
masters | |
nodes | |
etcd | |
[OSEv3:vars] | |
ansible_ssh_user=san | |
ansible_become=yes | |
containerized=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
urlencode() { | |
# urlencode <string> | |
local LC_ALL=C c i n | |
for (( i = 0, n = ${#1}; i < n; i++ )); do | |
c=${1:i:1} | |
case $c in | |
[[:alnum:].~_-]) printf %s "$c" ;; | |
*) printf %%%02X "'$c" ;; | |
esac | |
done |