Skip to content

Instantly share code, notes, and snippets.

View maurodelazeri's full-sized avatar
🎯
Focusing

Mauro Delazeri maurodelazeri

🎯
Focusing
View GitHub Profile
@maurodelazeri
maurodelazeri / CMakeLists.txt
Created January 21, 2020 16:00 — forked from physacco/CMakeLists.txt
MsgPack sample programs.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
PROJECT(msgpack_test)
SET(CMAKE_CXX_FLAGS_DEBUG "-g -std=c++11")
SET(EXECUTABLES test_vector test_stream test_class test_array test_map1 test_map2)
FOREACH(EXE ${EXECUTABLES})
ADD_EXECUTABLE(${EXE} "${EXE}.cpp")
TARGET_LINK_LIBRARIES(${EXE} msgpack)
@maurodelazeri
maurodelazeri / errors.grpc_conf
Created March 13, 2019 19:54 — forked from nginx-gists/errors.grpc_conf
Deploying NGINX Plus as an API Gateway, Part 3: Publishing gRPC Services
# Standard HTTP-to-gRPC status code mappings
# Ref: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md
#
error_page 400 = @grpc_internal;
error_page 401 = @grpc_unauthenticated;
error_page 403 = @grpc_permission_denied;
error_page 404 = @grpc_unimplemented;
error_page 429 = @grpc_unavailable;
error_page 502 = @grpc_unavailable;
error_page 503 = @grpc_unavailable;
# Ansible managed
global
# Remote syslog servers
log 10.0.102.102:514 local0
#log-send-hostname
daemon
chroot /var/lib/haproxy
group haproxy
maxconn 40000
@maurodelazeri
maurodelazeri / haproxy.cfg
Created February 26, 2019 00:10 — forked from wiredmax/haproxy.cfg
Sample HA-Proxy configuration for load balancing SockJS running on Node.JS servers.
global
maxconn 10000 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
@maurodelazeri
maurodelazeri / iptables.sh
Created April 30, 2018 12:55 — forked from sandcastle/iptables.sh
Default firewall configuration using iptables for a fresh Ubuntu 14.04 server.
#!/bin/sh -x
# ==================================
# iptables default configuration script
#
# - this locks down our servers port access
# ==================================
# install fail2ban
sudo apt-get update
@maurodelazeri
maurodelazeri / kafka
Created April 18, 2017 16:15 — forked from superscott/kafka
Simple Kafka Ubuntu init.d Startup Script
DAEMON_PATH=/opt/kafka/bin
DAEMON_NAME=kafka
# Check that networking is up.
#[ ${NETWORKING} = "no" ] && exit 0
PATH=$PATH:$DAEMON_PATH
# See how we were called.
case "$1" in
start)
@maurodelazeri
maurodelazeri / helpful-docker-commands.sh
Created April 1, 2017 15:39 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# helps with error: 'unexpected end of JSON input'
@maurodelazeri
maurodelazeri / docker.md
Created April 1, 2017 15:37 — forked from istepaniuk/docker.md
Docker command line cheatsheet

Docker cheatsheet

Run a new container in the foregrond

docker run -ti image

Stop, delete all docker containers

docker stop $(docker ps -a -q)

docker rm $(docker ps -a -q)

@maurodelazeri
maurodelazeri / zeromq_install.sh
Created March 10, 2017 05:19 — forked from cdjhlee/zeromq_install.sh
install zeromq in ubuntu 14.04
#!/usr/bin/bash
##############################################
#from http://zeromq.org/intro:get-the-software
##############################################
#get zeromq
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
#unpack tarball package
@maurodelazeri
maurodelazeri / spec.md
Created December 9, 2015 17:47 — forked from ePirat/spec.md
Icecast Protocol specification

Icecast protocol specification

What is the Icecast protocol?

When speaking of the Icecast protocol here, actually it's just the HTTP protocol, and this document will explain further how source clients need to send data to Icecast.

HTTP PUT based protocol

Since Icecast version 2.4.0 there is support for the standard HTTP PUT method. The mountpoint to which to send the data is specified by the URL path.