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
#!/usr/bin/env bash | |
readonly SCRIPT=$(basename "$0") | |
readonly VERSION='1.0.0' | |
readonly AUTHOR='xy.kong@gmail.com' | |
readonly SOURCE='https://gist.github.com/xykong/6efdb1ed57535d18cb63aa8e20da3f4b' | |
# For script running robust | |
set -o nounset # to exit when your script tries to use undeclared variables | |
set -o errexit # to make your script exit when a command fails |
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
Number.prototype.toPhrase = function (fem, one, two, three, four, five) | |
// Число прописью от 0 до 999 триллионов | |
// 100.toPhrase(false, 'чайник', 'чайника', 'чайника', 'чайника', 'чайников') | |
{ | |
var x = Math.round((this + Number.EPSILON) * 100) / 100; | |
if (x < 0 || x > 999999999999999.99) return false; | |
if (fem === undefined) fem = true; | |
if (!one) one = 'единица'; | |
if (!two) two = 'единицы'; |
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
upstream websocket { | |
server localhost:3000; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
access_log /var/log/nginx/websocket.access.log main; |