Skip to content

Instantly share code, notes, and snippets.

View daronco's full-sized avatar

Leonardo C. Daronco daronco

View GitHub Profile

Redis 4.2 roadmap

  1. Redis Cluster
  • Speed up key -> hashslot association. Now makes RBB loading 4x slower when there are many small keys.
  • Better multi data center story
  • redis-trib C coded and moved into redis-cli
  • Backup / Restore of Cluster
  • Non blocking MIGRATE (also consider not using 2X memory)
  • Faster resharding
  • Bug fixing and stress testing to bring it to next level of maturity
@daronco
daronco / letsencrypt-webroot-apache.md
Last active February 15, 2024 11:50
Letsencrypt with webroot on Apache

Config Apache with /etc/apache2/conf-available/le.conf:

Alias /.well-known/acme-challenge/ "/var/www/html/.well-known/acme-challenge/"
<Directory "/var/www/html/">
    AllowOverride None
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    Require method GET POST OPTIONS
</Directory>
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@tim-evans
tim-evans / duration.rb
Created February 19, 2016 19:04
Golang style duration parsing in Ruby
class Duration
def initialize(number_in_ms)
@value = number_in_ms
end
def self.parse(string)
value = string.scan(/([\d.-]+)(ms|s|m|h|d)/).reduce(0) do |total, parsed_duration|
number, unit = parsed_duration
total + case unit
when 'ms'
@fevangelou
fevangelou / default.vcl_PREFACE.md
Last active April 9, 2024 04:30
The perfect Varnish configuration for WordPress, Joomla, Drupal & other (common) CMS based websites

The perfect Varnish configuration for WordPress, Joomla, Drupal & other (common) CMS based websites

Updated on December 15th, 2021

IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).

USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.

IMPORTANT: The following setup assumes a 180 sec (3 minute) cache time for cacheable content that does not have the correct cache-control HTTP headers. You can safely increase this to 300 sec (or more) for less busier sites or drop it to 60 sec or even 30 sec for high traffic sites. It obviously depends on your use case.

@phrawzty
phrawzty / 2serv.py
Last active April 26, 2024 03:28
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
@fcecagno
fcecagno / build-apps.sh
Created November 11, 2014 19:58
Build bbb-apps
#!/bin/bash
sudo service bbb-red5 stop
sudo pkill -u red5
set -xe
sudo chmod -R 777 /usr/share/red5/webapps
apps=( "bbb-video" "bbb-voice" "bigbluebutton-apps" "deskshare" )
@fcecagno
fcecagno / build-web.sh
Last active August 29, 2015 14:09
Compile bbb-web
#!/bin/bash
set -xe
sudo service tomcat7 stop
sudo chmod 666 /var/log/bigbluebutton/bbb-web.log
cd ~/dev/bigbluebutton/bigbluebutton-web
# cp /var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties grails-app/conf/
sudo rm -rf /var/lib/tomcat7/webapps/bigbluebutton*

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&amp;staging
@lfzawacki
lfzawacki / changedb
Created May 14, 2014 15:54
Simple script to manage different database.yml files in a rails development environment
#!/home/lucas/.rbenv/shims/ruby
# Use an appropriate file path for your ruby interpreter
require 'fileutils'
class ChangeDB
def initialize dir='config/.changedb', db_yml='config/database.yml'
@dir = dir
@db_yml = db_yml