Skip to content

Instantly share code, notes, and snippets.

@butcher
butcher / alerts.yml
Last active December 7, 2018 17:24
Prometheus alerts configuration
groups:
- name: example
rules:
# Alert for any instance that is unreachable for >5 minutes.
- alert: SalesforceSubscriberDown
expr: (push_time_seconds{job="salesforce-subscriber"} offset 5m) == push_time_seconds{job="salesforce-subscriber"}
labels:
severity: page
annotations:
@butcher
butcher / prometheus.yml
Created December 7, 2018 17:22
Prometheus configurations
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
# initialize data
name = 'Pavel Nikitin'
start_working_with_ruby = 2008
timeLoad = 'fulltime'
technologies = ['Rails', 'MySQL', 'Cassandra', 'HTML', 'CSS']
personal = ['talented', 'creative', 'team player']
contacts = {:email => 'daddybutcher@gmail.com', :skype => 'pavel.butcher.nikitin', :blog => 'http://itstickers.blogspot.com', :linkedin => 'http://www.linkedin.com/pub/pavel-nikitin/16/327/363'}
# build CV
cv = <<CV
@butcher
butcher / color_builder.rb
Created February 15, 2012 14:44
Simple color builder
count = ARGV[0].to_i
min = ARGV[1].to_i
def int_to_hex(r,g,b)
"#%02X%02X%02X" % [r, g, b]
end
arr = []
r = 255
#!/usr/bin/env ruby
require 'rubygems'
require 'cloudfiles'
require 'paperclip'
# turn off paperclip logging because they use ActiveRecord
Paperclip.options[:log] = false
container = 'assets-test'
@butcher
butcher / color-theme-butcher.el
Created November 5, 2010 13:43
Dark color theme for Emacs
(defun color-theme-butcher ()
"Color theme by Pavel Nikitin."
(interactive)
(color-theme-install
'(color-theme-butcher
((background-color . "#101010")
(background-mode . dark)
(border-color . "black")
(cursor-color . "#A7A7A7")
(foreground-color . "#F8F8F8")
@butcher
butcher / .emacs
Created November 5, 2010 13:39
Emacs configuration to work with Ruby and RubyOnRails
;; Theme
(load-file "~/.emacs.d/color-theme-butcher.el")
(color-theme-butcher)
(set-frame-font "-misc-fixed-medium-r-normal--15-*-75-75-c-90-koi8-r")
(tool-bar-mode)
(menu-bar-mode)
(scroll-bar-mode)
;; Rinari