Skip to content

Instantly share code, notes, and snippets.

View mifkata's full-sized avatar
❤️
Code is love, code is freedom!

Andriyan Ivanov mifkata

❤️
Code is love, code is freedom!
View GitHub Profile
@mifkata
mifkata / test.js
Last active August 29, 2015 14:24
A very basic logic vs regex speed test (tries to match min 8 char length, alphanumeric word, that contains at least 1 integer, 1 uppercase letter and 1 special character). Tests 10 mil words by default, modify "tests" value to change.
(function() {
var integers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var chars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
var upperChars = chars.map(function(i) { return i.toUpperCase(); });
var specials = ['!','@','#','$','%','^','&','*','+','='];
var regex = /^(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&\*+=]).*$/;
var len, useint, usespecial, useupper, buffer;
var words = [];
var start = new Date().getTime();
@mifkata
mifkata / backend-coverage.json
Last active October 1, 2025 17:32
Elixir repo coveralls
{"label":"Backend Coverage","message":"97.0%","schemaVersion":1,"color":"brightgreen","namedLogo":"elixir"}