Skip to content

Instantly share code, notes, and snippets.

View lrascao's full-sized avatar

Luis Rascão lrascao

View GitHub Profile
View gist:37dab1876edf8e05866750959fc4928f
echo 65786563282769256325257327253130392527702563252573272531313125277274207379732061732053256325257327253434252762692563252573272531313025276173636969206173204225632525732725343425272563252573272531323225272563252573272531303825276962206173202563252573272539302527256325257327253130252741256325257327253631252725632525732725333925272021222324262829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787925632525732725333925272563252573272531302527256325257327253737252725632525732725363125276469762563252573272531303925272563252573272531313125276425632525732725313025276465662044286529256325257327253538252725632525732725313025272563252573272539252769256325257327253631252730256325257327253539252762256325257327253631252722222563252573272531302527256325257327253925276625632525732725313131252772206320692563252573272531313025272065256325257327253538252769256325257327253631252735382563252573272534322527692563252573272534332527412563252573272534362527692563252573272531313025276
View gist:c55f7f41c36bc805f1c55c5edd15da06
# mkdir -p /tmp/nginx
# nginx -c `pwd`/nginx-local-lb.conf
daemon off;
error_log /tmp/nginx/error.log warn;
# Define which servers to include in the load balancing scheme.
stream {
upstream stream_backend {
# server1 tcp port
View alacritty.yml
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
#
@lrascao
lrascao / gist:22a8f9643edfdde26b4632b7617e36d7
Created April 9, 2019 18:05
Validating Elliptic curve signatures in Erlang
View gist:22a8f9643edfdde26b4632b7617e36d7
% check against sigs generated at https://8gwifi.org/ecsignverify.jsp
% ideas from https://github.com/0x6e6562/otp_ecc/blob/master/src/otp_ecc.erl
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V8.3 (abort with ^G)
1> PublicBin = <<"-----BEGIN PUBLIC KEY-----
1> MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAElMlYUyrmL2UJV7hlug5/p1eeoOmXptgM
1> 3K4h8opBX3rGSFHhOIA2Yw1DBKCXKC8cGnNEUsmCunslB1OaYcFinw==
1> -----END PUBLIC KEY-----
@lrascao
lrascao / gist:0f5c40d208e45d5afa84896e7662dfa6
Created November 9, 2018 11:23
Set up System Tap on EC2 Linux
View gist:0f5c40d208e45d5afa84896e7662dfa6
# Setup
uname -r # gives you kernel version
sudo yum install kernel-devel-<kernel version>
sudo debuginfo-install kernel-<kernel version>
sudo yum install systemtap
# Preliminary testing
sudo stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
View gist:6a65a95406b068a42f4e254987145c0d
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
#
# Network settings
#
#
# This sets the max OS receive buffer size for all types of connections
View gist:dff2396669cbe85c69a336e69e5f73a5
# /etc/security/limits.conf
#
#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.
#
#Also note that configuration files in /etc/security/limits.d directory,
#which are read in alphabetical order, override the settings in this
#file in case the domain is the same or more specific.
#That means for example that setting a limit for wildcard domain here
#can be overriden with a wildcard setting in a config file in the
@lrascao
lrascao / gist:7f082d21e4a06a81e92ac3dfb788f1da
Created November 5, 2016 14:06
Patch to ddb_proxy grrr branch, fixes gpb build
View gist:7f082d21e4a06a81e92ac3dfb788f1da
From b863e924eb6a7c18c1bf026808d7d733d826c83d Mon Sep 17 00:00:00 2001
From: Luis Rascao <luis.rascao@miniclip.com>
Date: Sat, 5 Nov 2016 14:02:39 +0000
Subject: [PATCH] Move gpb options to ddb_proxy app rebar.config
A ddb_proxy specific rebar.config defines the
gpb configuration to be applied.
---
apps/ddb_proxy/rebar.config | 16 ++++++++++++++++
rebar.config | 15 ---------------
View gist:744d8a6e0beaad9078cf1f29763a5681
mkdir -p openssl/releases openssl/src openssl/tarballs
cd openssl/tarballs
curl http://www.openssl.org/source/openssl-1.0.2h.tar.gz -O
cd ..
mkdir -p releases/1.0.2h
cp tarballs/openssl-1.0.2h.tar.gz src/
cd src
@lrascao
lrascao / gist:6880485b8dc4c51c74392b0fa5b9d358
Last active December 29, 2023 12:29
Build Erlang statically linked with OpenSSL
View gist:6880485b8dc4c51c74392b0fa5b9d358
sudo yum install gcc gcc-c++ make libxslt fop ncurses-devel openssl-devel *openjdk-devel unixODBC unixODBC-devel
KERL_CONFIGURE_OPTIONS="--with-ssl=/home/ec2-user/openssl/releases/1.0.2h --disable-dynamic-ssl-lib" kerl build 18.3 18.3
# without ECC
KERL_CONFIGURE_OPTIONS="CFLAGS=-DOPENSSL_NO_EC=1" kerl build 18.3 18.3