Skip to content

Instantly share code, notes, and snippets.

@changeme
changeme / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Created June 13, 2019 11:09 — forked from mrothNET/LetsEncrypt+certbot+UFW+postfix+dovecot.md
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu
@changeme
changeme / Bloquear Whatsapp en Mikrotik
Last active December 4, 2018 01:01
Agregar el siguiente script en Mikrotik para bloquear Whatsapp. Adaptar según sea necesario las líneas 1, 4,13,19, y 20.
add comment="Whatsapp Address List" interval=2m name="Whatsapp Blocker" \
on-event="# Use DNS Entrys and add Address to the Firewall Address-list #\
\r\
\n:foreach i in=[/ip dns cache all find where (name~\"whatsapp\") && (type\
=\"A\") ] do={\r\
\n :local tmpAddress [/ip dns cache get \$i address];\r\
\ndelay delay-time=10ms\r\
\n# prevent script from using all cpu time #\r\
\n :if ( [/ip firewall address-list find where address=\$tmpAddress] = \"\
\") do={ \r\
@changeme
changeme / limpiar-boot.sh
Last active November 3, 2018 01:07
Limpiar /boot en Ubuntu cuando esta al 100%
#!/bin/bash
sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r` | while read -r line; do sudo apt-get -y purge $line;done
sudo apt-get -y autoremove; sudo update-grub
@changeme
changeme / librenms_linux_mon_setup.txt
Created July 20, 2018 15:23 — forked from axemann/librenms_linux_mon_setup.txt
LibreNMS Linux server monitoring setup (Ubuntu)
sudo apt-get install snmpd -y
sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
sudo su -
sudo cat > /etc/snmp/snmpd.conf << EOF
# Change public below to your preferred SNMP community string
com2sec readonly default public
group MyROGroup v2c readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
@changeme
changeme / guacamole.conf
Created January 5, 2017 04:35
nginx guacamole reverse proxy let'sencrypt.
server {
listen 443 ssl;
server_name sub.domain.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/sub.domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sub.domain.com/privkey.pem;
location / {
proxy_buffering off;
proxy_pass http://[IPADDRESS]:[PORT]/guacamole/;
proxy_http_version 1.1;
@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.
@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 / 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 / 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 / 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' \