Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 26, 2024 19:46
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@ksimka
ksimka / inarray_flipisset_arraysearch.php
Created March 4, 2015 13:24
in_array vs array_flip+isset vs array_search
<?php
$a = [];
//$s = 123456;
$s = 's6tbdfgj222dJGk';
$rs = str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 10);
$numGen = function() {
return rand(1, 9999999);
};