Skip to content

Instantly share code, notes, and snippets.

View strangeman's full-sized avatar
🚲
bicycles and crutches

Anton Markelov strangeman

🚲
bicycles and crutches
View GitHub Profile
@strangeman
strangeman / zabbixmon-mysql.sql
Created October 7, 2013 22:38
Adding special user for zabbix monitoring of mysql
GRANT USAGE ON *.* TO 'zabbixmon'@'localhost' IDENTIFIED BY 'superpassword';
flush privileges;
@strangeman
strangeman / Zabbix-CentOS-Client.sh
Last active December 24, 2015 22:58
Script to install zabbix client to CentOS/RHEL
#!/bin/bash
rpm --import http://repo.zabbixzone.com/centos/RPM-GPG-KEY-zabbixzone
rpm -Uvh http://repo.zabbixzone.com/centos/zabbixzone-release-0.0-1.noarch.rpm
yum install zabbix-agent zabbix-sender
@strangeman
strangeman / backup-databases.sh
Last active October 12, 2015 18:37
simple script for backup mysql databases
#!/bin/bash
#create user for dump
#mysql> GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD ON *.* to dump@localhost IDENTIFIED BY 'dumppwd';
#mysql> FLUSH PRIVILEGES;
BACKUP_PATH=/mnt/mysqlbackup/dump
DBASE[0]=base1
DBASE[1]=base2
@strangeman
strangeman / class skeleton
Created October 22, 2012 05:01
Skeleton of Puppet manifest, which install, configure and run daemon
# == Class: blah
#
# blahblahblah
#
# === Actions
# - blah
# - blah
# - blah
#
# === Examples
@strangeman
strangeman / nginx.conf
Created February 4, 2015 06:16
Hiload nginx + php-fpm
worker_processes auto;
events {
use epoll;
worker_connections 1024;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
@strangeman
strangeman / varnish_wordpress
Created November 27, 2014 03:59
Varnish example for wordpress
backend default {
.host = "127.0.0.1";
.port = "8080";
}
acl purge {
"127.0.0.1";
"localhost";
}
@strangeman
strangeman / backup-all-databases.sh
Last active August 29, 2015 14:10
another simple script for backup mysql databases
#!/bin/bash
#create user for dump
#mysql> GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD ON *.* to dump@localhost IDENTIFIED BY 'dumppwd';
#mysql> FLUSH PRIVILEGES;
BACKUP_PATH=/mnt/mysqlbackup/dump
# make backup directory
mkdir -p $BACKUP_PATH
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 7 days"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/html "access plus 7 day"
ExpiresByType text/x-javascript "access 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"