Skip to content

Instantly share code, notes, and snippets.

Igor Soarez soarez

Block or report user

Report or block soarez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
soarez /
Last active Oct 15, 2019
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

View deploy.bash
function deploy {
# Update the rsync target on the server
rsync \
-av \
--delete \
--delete-excluded \
$rsync_ignore_list_param \
$rsync_source/ $target:$rsync_target
soarez / gist:3481961
Created Aug 26, 2012
EC2 Amazon Linux AMI port prerouting with NAT iptables
View gist:3481961
# List rules
sudo iptables -t nat -L
# Add rule to forward 80 to 3080
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3080
# Will delete all rules from nat table
sudo iptables -F -t nat
soarez /
Created Jun 2, 2015
Symmetrical vs asymmetrical crypto

Symmetrical vs asymmetrical crypto

Disclaimer: This content is merely educational. [Don't roll your own crypto][dontDoYourOwnCrypto]. Use TLS and GPG.

These aren't new topics, but if you're reading this maybe you could use a quick

set -e
# load_generator="node test.js"
soarez / client.js
Created Jan 31, 2016
Finding how many requests Node tries to handle at the same time for a single connection
View client.js
const net = require('net');
const fs = require('fs');
var req = fs.readFileSync('./req.txt', { encoding: 'utf8' });
var socket = new net.Socket();
socket.connect(7001, '', function() {
var c = 50000;
while (c --> 0)
soarez / linetransform.js
Last active Dec 26, 2015
Line transform
View linetransform.js
var Transform = require('stream').Transform;
var util = require('util');
module.exports = LineTransform;
util.inherits(LineTransform, Transform);
function LineTransform() {
Transform.apply(this, arguments);
soarez / .tmux.conf
Last active Dec 20, 2015
My messy tmux conf
View .tmux.conf
# use b as prefix
set-option -g prefix C-b
unbind-key C-a
bind-key C-b send-prefix
# Start numbering at 1
set-option -g base-index 1
# Allows for faster key repetition
set-option -g escape-time 0
soarez /
Last active Dec 17, 2015
update and link a folder of git versioned npm modules
npm_root=$(npm root -g)
soarez / Makefile
Created Jan 30, 2013
Count stack frames
View Makefile
program: main.c
gcc -Wall -O0 -masm=intel -m32 -g -o program main.c
You can’t perform that action at this time.