Skip to content

Instantly share code, notes, and snippets.

View rikatz's full-sized avatar
Away for the next days

Ricardo Katz rikatz

Away for the next days
View GitHub Profile
@rikatz
rikatz / calicolab.txt
Created January 14, 2018 22:09
Calico Lab
-- If using GCE as your provider, you must first create networks, firewall rules and Instances
-- The following is based in Kelsey Hightower 'Kubernetes The Hard Way' tutorial
gcloud compute networks create calico-demo --subnet-mode custom
gcloud compute networks subnets create kubernetes \
--network calico-demo \
--range 10.240.0.0/24
@rikatz
rikatz / test cert
Created October 24, 2017 01:55
Test Certificate existense
<?php
$headers = apache_request_headers();
$cert1 = str_replace("\\n","\n",$headers['ssl-client-cert']);
if(!empty($cert1)) {
$certificado = openssl_x509_read($cert1);
$certuser = openssl_x509_parse($certificado);
$username = $certuser['subject']['CN'];