Skip to content

Instantly share code, notes, and snippets.

@crashev
crashev / .ssh_config
Created March 5, 2019 14:56 — forked from c3zi/.ssh_config
Set a background color in Terminal (tested on Gnome terminal) for different SSH environments
Host dev
HostName 127.0.0.1
User c3zi
Host demo
HostName 127.0.0.2
User c3zi
Host test
HostName 127.0.0.3
@crashev
crashev / uuid.php
Created September 19, 2017 12:02 — forked from ramsey/uuid.php
Creating an ordered time UUID alongside a timestamp-first COMB UUID.
<?php
// composer require ramsey/uuid moontoast/math
require_once 'vendor/autoload.php';
use Ramsey\Uuid\Codec\OrderedTimeCodec;
use Ramsey\Uuid\Codec\TimestampFirstCombCodec;
use Ramsey\Uuid\Generator\CombGenerator;
use Ramsey\Uuid\UuidFactory;
@crashev
crashev / gist:7cc9b4b7448299524d1cf8df34cdf9a9
Created July 7, 2017 10:01 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# /etc/rabbitmq/rabbitmq.config
#
# Follow the instructions on RabbitMQ website to create certificate authority and certificates -
#
# http://www.rabbitmq.com/ssl.html
#
[
{rabbit, [
{tcp_listeners,[{"127.0.0.1",5672}]},