This file contains hidden or 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
fn main() { | |
let mut v: Vec<Vec<&str>> = Vec::new(); | |
v.push(["1", "2"].to_vec()); | |
v.push(["3", "4", "5"].to_vec()); | |
v.push(["6", "7"].to_vec()); | |
let mut acc = Vec::new(); | |
This file contains hidden or 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
require "yaml" | |
require "git" | |
class UpdateClassifier | |
GIT_REPO = "[email protected]:it-hq/it-classifications.git".freeze | |
TMP_PATH = "#{Rails.root}/tmp".freeze | |
LOCAL_CLASSIFIERS_PATH = "#{TMP_PATH}/categories".freeze | |
REG_PARAM = "#{LOCAL_CLASSIFIERS_PATH}/**/*.yml".freeze |
This file contains hidden or 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
### Nginx ### | |
check process nginx with pidfile /opt/nginx/logs/nginx.pid | |
start program = "/etc/init.d/nginx start" | |
stop program = "/etc/init.d/nginx stop" | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if memory usage > 80% for 5 cycles then restart | |
if failed host 127.0.0.1 port 80 protocol http | |
then restart | |
if 3 restarts within 5 cycles then timeout |