Skip to content

Instantly share code, notes, and snippets.

@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 / 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.sh
Created August 21, 2017 13:32 — forked from sandeepraju/ttfb.sh
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@changeme
changeme / haproxy.conf
Created April 29, 2017 12:21 — forked from kishba/haproxy.conf
Sample HAProxy HTTPS configuration for Moodle and Ellucian Colleague web apps -- anonymized from Mid Michigan Community College
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
# Default SSL material locations
ca-base /etc/ssl/certs
@changeme
changeme / Fill_mikrotik_config.bash
Created March 9, 2017 19:29 — forked from elmariofredo/Fill_mikrotik_config.bash
L2TP IPSEC VPN Auto config for mikrotik based on following tutorial http://www.nasa-security.net/mikrotik/mikrotik-l2tp-with-ipsec/ !!! Edit user name/user pass and ipsec secret
# Fetch and fill config
mikrotik_vpn_config=$(curl https://gist.github.com/elmariofredo/7232556/raw/VPN-L2TP-IPSEC.mikrotik \
| sed -e '
s/IPSEC_PEER_SECRET/somesecret/g;
s/USER1_NAME/mario/g;
s/USER1_PASS/somepass/g;
s/IP_RANGE/172.16.24.100-172.16.24.200/g;
s/DNS_SERVER/172.16.22.1/g;
s/LOCAL_ADDRESS/172.16.22.1/g;
s/WINS_SERVER/172.16.22.1/g')
@changeme
changeme / heupdater.txt
Created March 9, 2017 19:28 — forked from horzadome/heupdater.txt
Hurricane Electric IPv6 tunnel updater script for Mikrotik RouterOS
# Update Hurricane Electric IPv6 Tunnel Client IPv4 address
# This is an upgrade to an existing script from
# http://wiki.mikrotik.com/wiki/Hurricane_Electric_IPv6_Tunnel_-_IPv4_Endpoint_updater
# API call format:
# https://#USERNAME:$API_KEY@ipv4.tunnelbroker.net/nic/update?username=$USERNAME&password=$API_KEY&hostname=$TUNNEL_ID
# ----------------------------------
# Modify the following to match your parameters
# ----------------------------------
# Router's WAN interface name