Skip to content

Instantly share code, notes, and snippets.

* {
padding: 0;
margin: 0;
border: 0;
}
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
@amalichev
amalichev / mixins.scss
Last active March 6, 2022 15:29
adaptive-font()
$layout-width: 1280;
@mixin adaptive-font($lg-size: 16, $xs-size: 14, $xs-screen: 320) {
$add-size: $lg-size - $xs-size;
$max-width: $layout-width - $xs-screen;
font-size: calc(#{$xs-size + px} + #{$add-size} * ((100vw - #{$xs-screen + px}) / #{$max-width}));
}
// h1 { @include adaptive-font(32, 24); }
@amalichev
amalichev / unlimited_trials_babeledit.txt
Created January 13, 2021 03:22
Activate BabelEdit temporarily / Unlimited trial
Obviously for educative purposes only.
Furthermore, this DOESN'T activate BabelEdit permanently.
If you like the software, buy it, the devs deserve it.
Since I have no money to buy it, I discovered a workaround for unlimited trials.
It's quite a annoying workaround, but ... it works!
Firstly go to "c:\windows\system32\drivers\etc\" and open the "hosts" file in Notepad/Notepad++/VSCode/Sublime/Atom/whatever as admin (if you don't open it as admin, it won't let you save it).
Add this line at the end of the file:
@amalichev
amalichev / vhosts.conf
Created November 28, 2018 12:54 — forked from dj1020/vhosts.conf
Laravel Virtual Host for Apache Example
<VirtualHost *:80>
DocumentRoot "/Users/myName/Projects/laravel/public"
ServerName myLaravel.dev
<Directory "/Users/myName/Projects/laravel/public">
AllowOverride All
Options FollowSymLinks +Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
@amalichev
amalichev / scroll-to-content.js
Last active June 22, 2018 06:17
Scroll to content (jQuery)
// scroll to content button
var $scrollToContentBtn = $('.js-scroll-to-content'),
allowScrolling = true;
allowAutoScrolling = $(window).scrollTop() === 0;
$(window).scroll(function () {
var $this = $(this);
if ($this.scrollTop() > 0 && allowAutoScrolling) {
@amalichev
amalichev / index.html
Created November 30, 2016 16:01
HTML | Отключение генерации ссылок на телефонные номера
<meta name="format-detection" content="telephone=no">
@amalichev
amalichev / ia.core.mysqli.php
Created November 30, 2016 16:01
Subrion | Отключение STRICT MODE в Mysql
protected function _connect()
{
$this->_link = mysqli_init();
if (!$this->_link)
{
die('mysqli_init failed.');
}
if (!mysqli_options($this->_link, MYSQLI_OPT_CONNECT_TIMEOUT, 5))
{