Skip to content

Instantly share code, notes, and snippets.

# PUEDEN ESTAR EN DISTINTOS ARCHIVOS
#############################################################
# SPAM ASSASSIN
check process spamd with pidfile /var/run/spamd.pid
group mail
start program = "/etc/init.d/spamassassin start"
stop program = "/etc/init.d/spamassassin stop"
if cpu usage > 99% for 5 cycles then alert
if mem usage > 99% for 5 cycles then alert
/bin/bash
#Configure servers
#SERVER1=190.228.29.39
SERVER2=newhostname-or-ip
#Uncomment to hide folder sizes
#FAST="--nofoldersizes"
#Uncomment to do a dry run (no actual changes)
global
daemon
stats socket /var/run/haproxy.stat mode 600
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
ulimit-n 80020
pidfile /var/run/haproxy.pid
tune.ssl.default-dh-param 2048
ssl-default-bind-options no-sslv3
@changeme
changeme / Install OpenSSH-HPN on CentOS
Created August 18, 2014 05:30
Install OpenSSH-HPN on CentOS
yum install zlib zlib-devel pam pam-devel openssl openssl-devel gcc patch make
cd /usr/src
wget http://www.thirdechelon.org/stuff/openssh-6.6p1-hpnssh14v5.diff.gz
wget http://www.thirdechelon.org/stuff/openssh-6.6p1.tar.gz
tar -xzvf openssh-6.1p1.tar.gz
cd openssh-6.1p1
zcat /usr/src/openssh-6.1p1-hpn13v14.diff.gz | patch
./configure –prefix=/usr –sysconfdir=/etc/ssh –with-pam
mv /etc/ssh/ssh_config /etc/ssh/ssh_config.original
mv /etc/ssh/sshd_config /etc/ssh/sshd_config.original
@changeme
changeme / cpanel-redis.sh
Created September 14, 2017 10:09
Redis installer for cPanel
#!/bin/bash
# Tested on: CENTOS 7.3 lxc v66.0.19
# Source: https://help.bigscoots.com/cpanel/cpanel-easyapache-4-installing-redis-and-redis-php-extension
VERSION=`rpm -q --queryformat '%{VERSION}' centos-release`
yum install -y -q remi-release epel-release
yum update
yum -y -q install redis --enablerepo=remi --disableplugin=priorities
@changeme
changeme / monitor-ttfb.sh
Last active October 7, 2017 11:10 — forked from sandeepraju/monitor-ttfb.sh
A simple script to log the TTFB (Time to First Byte) of a given web link
#!/bin/bash
# file: monitor-ttfb.sh
# note: to deploy this, add the following line to your crontab
# * 10-17 * * 1-5 /path/to/monitor-ttfb.sh "https://domain-to-monitor.com" /path/to/log-file/
# the above cronjob runs every minute from 10AM to 5PM only on weekdays
function ttfb() {
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-H 'Accept-Encoding: gzip, deflate, sdch' \
@changeme
changeme / ttfb.rb
Created October 7, 2017 19:37 — forked from eThikas/ttfb.rb
Continuously measure 'Time To First Byte'. Easily plot Connection and TTFB
#!/usr/bin/env ruby
#
# @Name TTFB Measurer
# @Author Rasmus Christiansen
# @Description
#
# Measures the "true" loading time of a website.
# Saves data output to an .out-file
# Saves additional .conn and .ttfb files for easy plotting
@changeme
changeme / install_netcdf4.sh
Created October 19, 2017 16:15
Install netCDF4 in Ubuntu
#!/bin/bash
# Script to install hdf5 and netCDF4 libraries on a Linux Ubuntu system
# After: https://code.google.com/p/netcdf4-python/wiki/UbuntuInstall
# And http://unidata.github.io/netcdf4-python/
# You can check for newer version of the programs on
# ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/
# and other sources
@changeme
changeme / easyapache3
Last active November 3, 2017 01:11
Instalacion de mod_pagespeed en cPanel
/usr/local/cpanel/3rdparty/bin/git clone https://github.com/pagespeed/cpanel.git /tmp/pagespeed/
cd /tmp/pagespeed/Easy
tar -zcvf Speed.pm.tar.gz pagespeed
mkdir -p /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy
mv Speed.pm Speed.pm.tar.gz -t /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/
cd && rm -rf /tmp/pagespeed
## Continuar instalando desde EasyApache
@changeme
changeme / zimbra-letsencrypt-renew.md
Created April 4, 2018 04:33 — forked from ugurerkan/zimbra-letsencrypt-renew.md
Zimbra 8.6.0 Letsencrypt SSL renew walkthrough.