Skip to content

Instantly share code, notes, and snippets.

View krybinski's full-sized avatar

Kamil Rybiński krybinski

  • Gdansk
View GitHub Profile
@krybinski
krybinski / scrolling.js
Last active April 29, 2023 16:59
Disable and enable scrolling in JS
const keys = {37: 1, 38: 1, 39: 1, 40: 1};
function preventDefault(e) {
e.preventDefault();
}
function preventDefaultForScrollKeys(e) {
if (keys[e.keyCode]) {
preventDefault(e);
return false;
@krybinski
krybinski / index.html
Last active December 16, 2019 05:35
HTML file template
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<meta name="format-detection" content="telephone=no" />
<title>Title</title>
<meta name="description" content="" />
<meta name="author" content="" />
@krybinski
krybinski / _mixins.sass
Last active May 5, 2020 07:08
Helpful SASS mixins
/** Placeholder */
@mixin placeholder {
&.placeholder { @content; }
&:-moz-placeholder { @content; }
&::-moz-placeholder { @content; }
&:-ms-input-placeholder { @content; }
&::-webkit-input-placeholder { @content; }
}
/** Placeholder autofill */
@krybinski
krybinski / .htaccess
Last active August 17, 2018 17:13
.htaccess file for Laravel project
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]