Skip to content

Instantly share code, notes, and snippets.

View designervoid's full-sized avatar
🌌

designervoid

🌌
View GitHub Profile
// Measure page scroll speed
(function() {
if (document.body.scrollHeight <= window.innerHeight) {
console.log('Scrolling measurement is only possible if the window can actually be scrolled!');
return;
}
function calcScrollTime(startTime, iterations) {
return Math.round((Date.now() - startTime) / iterations) / 1000;
}
@designervoid
designervoid / localhost-ssl-certificate.md
Created May 25, 2020 17:10 — forked from ethicka/localhost-ssl-certificate.md
Localhost SSL Certificate on Mac OS Sierra and High Sierra

This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.

Set up localhost.conf

sudo nano /etc/ssl/localhost/localhost.conf

Content:

[req]
<form class="form_modal_window" action="" id='form'>
<input type="text" name="name" placeholder="Ваше имя" required>
<input type="email" name="email" placeholder="Ваш email" required>
<input type="phone" name="phone" placeholder="Ваш телефон" required>
<input type="hidden" name="type_complect" value="complect-1">
<input class="form_sub" name="sub" type="submit" value="send">
</form>
<form class="form_modal_window" action="" id='form'>
<input type="text" name="name" placeholder="Ваше имя" required>
<!-- START OF HTML -->
<!-- КНОПКА-->
<div class="page-wrapper">
<a class="btn trigger" href="#">Открыть форму</a>
</div>
<!-- МОДАЛЬНОЕ ОКНО-->
<div class="modal-wrapper">
<div class="head"></div>