Skip to content

Instantly share code, notes, and snippets.

mikehains

Block or report user

Report or block mikehains

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
@mikehains
mikehains / https-on-localhost.md
Last active Apr 28, 2018 — forked from adnan360/https-on-localhost.md
Use HTTPS on Localhost (XAMPP, Windows)
View https-on-localhost.md

Sometimes some websites require https to work. This can be useful in those cases.

This has been tested with XAMPP (PHP 7.0.8) on Windows 7. Please see the Reference links at the end if in confusion about some step.

STEP 1: Editing Configs

Open:

C:\xampp\php\php.ini
@mikehains
mikehains / globals_module
Created May 4, 2018
Javascript module storing globals in an easy jQuery like way
View globals_module
<script type="text/javascript">
(function(){
// These are <<functions>> exposed on the object as properties.
var _publics = {
globals : _globals
};
/* ----------------------------------------------------------------
@mikehains
mikehains / gist:08b61c621320f78a5f14f89ad3a5739f
Last active May 20, 2019
AWS EC2 (beanstalk) PHP 7.2 ... Sodium ... Solution
View gist:08b61c621320f78a5f14f89ad3a5739f

AWS have published that their AMI with PHP 7.2 has sodium (cryptography).

Plainly (as at writing) it does not. There is no package available. There is no solution.

Have attempted installing etc, but it is a long way around and messy.

Instead, there is an excellent PHP 7.2 Polyfill, from the orignal authors - right here: https://github.com/paragonie/sodium_compat

Here's how to install it:

View PHP using AWS Secrets Manager (is too slow)
<?php
/* ----------------------------------------------------------------------------
Create a file in root directory, called: composer.json
with the following content:
{
"require": {
"aws/aws-sdk-php": "*"
}
}
You can’t perform that action at this time.