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
Late 4th century AD The Roman Empire began to collapse | |
Alexandria in the province of Egypt, still preserved part of its splendor. It owned one of the 7 wonders of the ancient world. the legendary lighthouse, and the largest known library. | |
The library was not only a cultural symbol. But religious a place where the pagans worshiped their ancestral gods. | |
The traditional pagan cult now coexisted in the city with the Jewish. And with an unstoppable religion, until recently Christianity was prohibited | |
**** | |
After taking the library, many pagans converted to Christianity and Alexandria experienced a period of peace. |
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
*#c::Run Calc.exe | |
#n:: | |
Run Notepad | |
return | |
#u::Send +{Up 10} | |
#j::Send +{Down 10} | |
#a:: | |
Send {Home 20} | |
CoordMode, Mouse, Screen |
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
from Tkinter import * | |
from PIL import Image, ImageTk, ImageDraw | |
import urllib2 | |
IMG_URI = "https://raw.githubusercontent.com/skihero/cor3/master/image_sample.jpg" | |
IMG_NAME = "image_sample.jpg" | |
bbox = [ (16, 17, 118, 152), |
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
Quick hash to put normal action information in one place: | |
our $action_info = { | |
# Name # clusterwide? # helpstring | |
archive_ready => [1, 'Check the number of WAL files ready in the pg_xlog/archive_status'], | |
autovac_freeze => [1, 'Checks how close databases are to autovacuum_freeze_max_age.'], | |
backends => [1, 'Number of connections, compared to max_connections.'], | |
bloat => [0, 'Check for table and index bloat.'], | |
checkpoint => [1, 'Checks how long since the last checkpoint'], | |
cluster_id => [1, 'Checks the Database System Identifier'], | |
commitratio => [0, 'Report if the commit ratio of a database is too low.'], |
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
my @meminfo = `/bin/cat /proc/meminfo`; | |
foreach (@meminfo) { | |
chomp; | |
if (/^Mem(Total|Free):\s+(\d+) kB/) { | |
my $counter_name = $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
cat attributes/default.rb | |
# nrpe packge options | |
default['nrpe']['package']['options'] = nil | |
# nrpe daemon user/group | |
default['nrpe']['user'] = 'nagios' | |
default['nrpe']['group'] = 'nagios' | |
# config file options | |
default['nrpe']['allow_bash_command_substitution'] = nil |
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
cat templates/default/nrpe.cfg.erb | |
# Autogenerated by Chef. | |
<%= "log_facility=#{node['nrpe']['log_facility']}" unless node['nrpe']['log_facility'].nil? %> | |
<%= "allow_bash_command_substitution=#{node['nrpe']['allow_bash_command_substitution']}" unless node['nrpe']['allow_bash_command_substitution'].nil? %> | |
<%= "command_prefix=#{node['nrpe']['command_prefix']}" unless node['nrpe']['command_prefix'].nil? %> | |
pid_file=<%= node['nrpe']['pid_file'] %> | |
server_port=<%= node['nrpe']['server_port'] %> | |
<%= "server_address=#{node['nrpe']['server_address']}" unless node['nrpe']['server_address'].nil? %> | |
nrpe_user=<%= node['nrpe']['user'] %> |
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
examples $ cat base_monitoring.rb | |
# | |
# Cookbook Name:: monitoring | |
# Recipe:: base_monitoring | |
# | |
# Copyright 2013, Example Company, Inc. | |
# | |
# This recipe defines the necessary NRPE commands for base system monitoring | |
# in Example Company Inc's Chef environment. |
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
include_dir = "#{node['nrpe']['conf_dir']}/nrpe.d" | |
directory include_dir do | |
owner node['nrpe']['user'] | |
group node['nrpe']['group'] | |
mode '0755' | |
end | |
template "#{node['nrpe']['conf_dir']}/nrpe.cfg" do | |
source 'nrpe.cfg.erb' |
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
# get a list of files | |
for f in `ls` | |
do | |
echo "command[${f}]=/usr/lib/nagios/plugins/${f} -H localhost -db apigee -u nagios --dbpass random_password # -w -c " | |
done | |
NewerOlder