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
#!/bin/bash | |
list_of_tz=(America/New_York Asia/Tehran Europe/Malta Europe/Mardrid Asia/Kolkata Europe/Vilnius) | |
RED=$(tput setaf 1) GREEN=$(tput setaf 2) | |
for i in ${list_of_tz[@]}; do | |
timezone="${GREEN}${i}:" | |
date="$RED $(TZ=$i date)" | |
echo $timezone $date |
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
... | |
frontend redis_gate | |
bind 127.0.0.1:5000 name redis | |
default_backend redis_servers | |
maxconn 1024 | |
backend redis_servers | |
balance roundrobin | |
option tcp-check |
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
#!/bin/bash | |
# -------------------------------------------------------------- | |
# [Author] Masoud Ghorbani (@msudgh) | |
# [Created] June 8, 2017 | |
# [Description] Compress the files and exclude the gitignore file lines | |
# -------------------------------------------------------------- | |
# Define the source file that represent the files to be exclude | |
file=.gitignore |
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
/** | |
* | |
* An module to detect the environment of the scripts is running. | |
* if the value of the module was true, the script is running on browser environment otherwise it's on Node.js | |
* | |
* @returns {boolean} - return a boolean object | |
* | |
* @example - import the module in your scripts and just call it. | |
* let detectENV = require('./detectENV.js') | |
* |
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
function toFarsiDigit(number) { | |
const regex = /[0-9]/g | |
let result = number.replace(regex, function (w) { | |
return String.fromCharCode(w.charCodeAt(0) + 1728) | |
}) | |
return result | |
} | |
function toEnglishDigit(number) { |