Skip to content

Instantly share code, notes, and snippets.

View slavafomin's full-sized avatar
✌️
Let's make this World a better place!

Slava Fomin II slavafomin

✌️
Let's make this World a better place!
View GitHub Profile
@slavafomin
slavafomin / plugins.csv
Created April 16, 2020 09:28
Chrome > 60
Chrome Version Babel Plugin
75 proposal-numeric-separator
80 proposal-nullish-coalescing-operator
80 proposal-optional-chaining
66 proposal-json-strings
66 proposal-optional-catch-binding
63 proposal-async-generator-functions
62 transform-dotall-regex
64 proposal-unicode-property-regex
64 transform-named-capturing-groups-regex
@slavafomin
slavafomin / core-js-polyfills-by-browsers.json
Created October 24, 2019 07:48
List of core-js polyfills by browsers and versions with bundle filesize
This file has been truncated, but you can view the full file.
[
{
"name": "ie",
"title": "IE",
"versions": {
"6": {
"polyfills": [
"es.symbol",
"es.symbol.description",
"es.symbol.async-iterator",
@slavafomin
slavafomin / corejs-polyfill-size-sorted.txt
Last active October 23, 2019 13:11
core-js polyfills individual filesizes
┌────────────────────────────────────────┬──────────┐
│ Polyfill │ Size, KB │
├────────────────────────────────────────┼──────────┤
│ web.url │ 31.61 │
├────────────────────────────────────────┼──────────┤
│ es.typed-array.uint8-clamped-array │ 22.02 │
├────────────────────────────────────────┼──────────┤
│ es.typed-array.float32-array │ 22.02 │
├────────────────────────────────────────┼──────────┤
│ es.typed-array.float64-array │ 22.02 │
@slavafomin
slavafomin / buildspec.yml
Created October 20, 2019 20:12
Installing s3cmd in AWS CodeBuild instance using yum (Amazon Linux 2)
version: 0.2
phases:
install:
commands:
# Installing "s3cmd" deployment utility
- >-
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm &&
yum update -y &&
@slavafomin
slavafomin / gtm-unminified.js
Last active September 10, 2019 15:02
Google Tag Manager script unminified
window['dataLayer'] = window['dataLayer'] || [];
window['dataLayer'].push({
'gtm.start': new Date().getTime(),
event: 'gtm.js'
});
const firstScriptElement = document.getElementsByTagName('script')[0];
const scriptElement = document.createElement('script')
.dc-button {
// common styles
@at-root a#{&} {
// styles for <a> element
}
@at-root button#{&} {
// styles for <button> element
// NOT WORKING! //
.dc-button {
// common styles
a& {
// styles for <a> element
}
.dc-button {
/* common styles */
}
a.dc-button {
/* styles for <a> element */
}
button.dc-button {
/* styles for <button> element */
@slavafomin
slavafomin / nginx.conf
Created January 22, 2019 17:35
How to enable CORS in nginx with origin matching
server {
listen 80 default_server;
root /var/www;
location / {
set $cors '';
set $cors_allowed_methods 'OPTIONS, HEAD, GET';
if ($http_origin ~ '^https?://(www\.)?example.com$') {
set $cors 'origin_matched';
@slavafomin
slavafomin / redirect.html
Created January 18, 2019 16:12
HTTP Cache Test
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cache Test Redirect</title>
</head>
<body>