Skip to content

Instantly share code, notes, and snippets.

@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 / 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.
@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 / 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 / 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 / tips.md
Last active January 20, 2020 10:20
Tips y checklist para organizar la mudanza.

Organizar una mudanza

La idea es realizar un checklist, tanto para los que ya tienen varias mudanzas encima, como los primerizos... basicamente, porque siempre es estresante.

Acepto contribuciones.

Preparativos

  • Cajas
  • Bolsas de residuo
#!/bin/bash
echo "Chmoding user files to 0644..."
for i in `/usr/local/vesta/bin/v-list-sys-users | awk '{if(NR>2)print}'`; do find /home/$i/web/ -name 'public_html' -type d -print0 | xargs -0 -I {} find '{}' -type f -print0 | xargs -0 -I {} chmod 0644 {}; done
echo "Done."
echo "Chmoding user folder to 0755..."
for i in `/usr/local/vesta/bin/v-list-sys-users | awk '{if(NR>2)print}'`; do find /home/$i/web/ -name 'public_html' -type d -print0 | xargs -0 -I {} find '{}' -type d -print0 | xargs -0 -I {} chmod 0755 {}; done
echo "Done."
echo "Fixing ownership of files..."