Skip to content

Instantly share code, notes, and snippets.

View webmaks's full-sized avatar
🏠
Working from home

Maksim Tarasenko webmaks

🏠
Working from home
View GitHub Profile
upstream backend {
server localhost:8222;
}
server {
listen 80;
listen 443;
server_name subdomain.example.com;
return 301 $scheme://example.com$request_uri;
^\+?\d(\s|\d)(\s|\d|\()(\s|\-|\d)\d(\s|\d)(\)|\s|\d|\-)(\s|\d)\d(\s|\d)?(\s|\d)?(\-|\d)?(\s|\d)?(\s|\d)?(\-|\d)?\d?\d?$
@webmaks
webmaks / main.cf
Created October 5, 2014 23:57
postfix config file
myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
@webmaks
webmaks / .screenrc
Created October 5, 2014 18:39
Nice one more .screenrc
# look and feel
caption always "%{= bb}%{+b w}%h %=%{=b rw} %l %{= db} ${USER}@%H %{= dg}%c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
# skip the startup message
startup_message off
# go to home dir
chdir
@webmaks
webmaks / centos.sh
Last active January 2, 2016 20:58
Zabbix
#!/bin/bash
# centos.sh
$HOSTNAME=`hostname`
$SERVER='mon.sys-tools.net'
# Add required repository
sudo rpm --import http://repo.zabbixzone.com/centos/RPM-GPG-KEY-zabbixzone
sudo rpm -Uvh http://repo.zabbixzone.com/centos/zabbixzone-release-0.0-1.noarch.rpm
# Install last avaliable version of zabbix-agent