Skip to content

Instantly share code, notes, and snippets.

View andresaquino's full-sized avatar
🏠
Working from home

Andrés Aquino andresaquino

🏠
Working from home
View GitHub Profile

SSL

  1. 1-way SSL (a.k.a. Server Authentication)
    1. Client confirms the server’s identity via the server’s provided certificate by verifying it with a CA (Certificate Authority).
    2. Then the Public Key contained in the received certificate is used along the Session Key to encrypt all sent/received messages.
  2. 2-way SSL (a.k.a. Client Authentication, Mutual Authentication)
    1. Server and Client confirm the other’s identity after each share their own public certificate by verifying it with a CA.
    2. Then the Public Key contained in the received certificate is used along the Session Key to encrypt all sent messages.

Keystore

@melix
melix / bench-string-concat.groovy
Created June 9, 2017 16:42
String concat Groovy
@Grab(group='org.gperfutils', module='gbench', version='0.4.3-groovy-2.4')
String a = 'The quick brown fox'
String b = 'jumps over the lazy dog'
int x = 1
double y = 2
benchmark {
'simple concat' {
String concat = a + ' ' + b + ' ' + x + ' ' + y
@mariochavez
mariochavez / info.md
Created October 28, 2016 17:31
Postgresql
@tmslnz
tmslnz / dnsmasq.md
Last active March 20, 2023 07:07
Setting up dnsmasq on OS X

Install dnsmasq

Via brew or other method

Set up DNS resolver order

In order to work on every connection and on any TLD, dnsmasq needs to be the first DNS resolver receving the query.

And since dnsmasq is a local process, all DNS queries need to go to 127.0.0.1

On macOS, /etc/resolv.conf is automaticaly created, depending on a variety of things (network settings, etc), so it cannot be edited.

@mariochavez
mariochavez / GIF-Screencast-OSX.md
Created September 13, 2016 20:47 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ball6847
ball6847 / mariadb-swarm.sh
Last active April 14, 2017 08:42
Create mariadb cluster using Docker Swarm
#!/bin/sh
# first, create overlay network to make all of your nodes can to talk to each others.
docker network create -d overlay mariadb-network
# then, create primary node, make sure you create the service with only 1 replica
docker service create \
--name mariadb-master \
--replicas 1 \
--mount target=/var/lib/mysql,source=/vol/mariadb-master,type=bind \
@VimleshS
VimleshS / ruby_cert.rb
Created August 30, 2016 09:35
Usage examples of ruby’s openssl lib
#Reference
#https://devnotcorp.wordpress.com/2012/08/21/usage-examples-of-rubys-openssl-lib/
#!/usr/bin/ruby
require 'openssl'
require 'date'
require 'time'
@voxxit
voxxit / RUNBOOK.md
Created April 29, 2016 14:26
Example of a solid run book/operations manual

Run Book / Operations Manual

  1. Table of Contents
  2. System Overview
    • Service Overview
    • Contributing Applications, Daemons, and Windows Services
    • Hours of Operation
    • Execution Design
    • Infrastructure and Network Design
    • Resilience, Fault Tolerance and High-Availability
@alexserver
alexserver / rest-basics.md
Created October 28, 2015 18:56
REST basics, Theory, Principles, and examples.

RESTful API know-how

Motivation

I place my learning process in this document with 2 motives:

  1. To have a quick guide whenever I lost the track of knowledge.
  2. To share the knowledge with anyone wants to learn RESTful APIs

1. Before, some theory