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
#assuming rvm installed with Ruby 2+ | |
#install latest passenger gem | |
gem install passenger --pre | |
#install nginx from sources with passenger module | |
passenger-install-nginx-module |
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
#zabbix user needs to be in /etc/sudoers to be able to execute ipmitool | |
zabbix ALL=NOPASSWD: /usr/bin/ipmitool | |
#zabbix config has to collect desired UserParameters | |
UserParameter=ipmi.ambient_temp,sudo ipmitool sdr | grep "Ambient" | awk '{print $3}' | head -1 | |
UserParameter=ipmi.cpu_temp,sudo ipmitool sdr | grep "CPU" | awk '{print $3}' | head -1 | |
UserParameter=ipmi.cpu_fan,sudo ipmitool sdr | grep -i "FAN1 SYS" | awk '{print $4}' | head -1 | |
UserParameter=ipmi.cpu_fan_status,sudo ipmitool sdr | grep -i "FAN1 SYS" | awk '{print $7}' | head -1 | |
#after restart of zabbix_agentd, collected values can be tested via |
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
#mysql | |
#export | |
mysqldump -u root -p <db> > <filename>.sql | |
#import | |
mysql -u root -p <db> < <filename>.sql | |
#mongo | |
#export |
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
#!/usr/bin/env ruby | |
require 'syslog' | |
require 'net/http' | |
require 'aws-sdk' | |
Syslog.open | |
AWS.config({ | |
:access_key_id => '<iam user key>', | |
:secret_access_key => '<iam user secret>' |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"route53:ChangeResourceRecordSets", | |
"route53:GetHostedZone", | |
"route53:ListResourceRecordSets" | |
], | |
"Effect": "Allow", | |
"Resource": [ |
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
class ApplicationController < ActionController::Base | |
rescue_from Mongoid::Errors::DocumentNotFound, :with => :rescue_not_found | |
protected | |
def rescue_not_found | |
render :template => 'application/not_found', :status => :not_found | |
end | |
end |
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
{ | |
"Ares_odpovedi": { | |
"xmlns:are": "http:\/\/wwwinfo.mfcr.cz\/ares\/xml_doc\/schemas\/ares\/ares_answer_or\/v_1.0.3", | |
"xmlns:D": "http:\/\/wwwinfo.mfcr.cz\/ares\/xml_doc\/schemas\/ares\/ares_datatypes\/v_1.0.3", | |
"xmlns:U": "http:\/\/wwwinfo.mfcr.cz\/ares\/xml_doc\/schemas\/uvis_datatypes\/v_1.0.3", | |
"odpoved_datum_cas": "2012-12-06T06:04:46", | |
"odpoved_pocet": "1", | |
"odpoved_typ": "Vypis_OR", | |
"vystup_format": "XML", | |
"xslt": "klient", |
NewerOlder