This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a session for Alamofire where we add a certificate. This in case the client server has s self signed certficate. | |
You can use this constante inside your network manager and use it as | |
session.request(...) | |
.validate() | |
.response() | |
NOTE: The certificate has to be encoded in a der format not in pem, because apple only supports der as noted in this stackoverflow answer https://stackoverflow.com/a/51742988 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Shuffle divs called .el in a random way | |
*/ | |
function shuffleAnswers() { | |
let positions = []; | |
$(".el").each(function (i) { | |
positions.push(i); | |
}); | |
positions.sort(function () { | |
return 0.5 - Math.random(); |