Skip to content

Instantly share code, notes, and snippets.

@Zmetser
Zmetser / input.scss
Created April 30, 2022 08:36
Generated by SassMeister.com.
@use "sass:map"; // include { map } from 'sass/map';
@use "sass:list"; // include { list } from 'sass/list';
// Lists
// 16px 24px 32px 64px
$icons: 16, 24, 32, 64, 128, 512; // JS tomb [16px, 24px]
// array.foreach(size => ...)
@each $size in $icons {
.icon-#{$size} {
@Zmetser
Zmetser / input.scss
Created April 30, 2022 07:59
Generated by SassMeister.com.
// https://sass-lang.com/
// Preprocessing
/*************
* Variables *
*************/
$base-color: #bada55; // nincs kulonbseg a - es _ kozott $base_color == $base-color
$string: "";
$border-dark: rgba($base_color, 0.8);
@Zmetser
Zmetser / input.scss
Created April 29, 2022 09:59
Generated by SassMeister.com.
// https://sass-lang.com/
// Preprocessing
/*************
* Variables *
*************/
$base-color: #c6538c; // nincs kulonbseg a - es _ kozott $base_color == $base-color
$border-dark: rgba($base_color, 0.88);
@Zmetser
Zmetser / amp-ima-video.html
Created April 23, 2020 11:17
The parent tag of tag 'audio > track' is 'track', but it can only be 'audio'.
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<link rel="canonical" href="self.html" />
<meta name="viewport" content="width=device-width,minimum-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async="" custom-element="amp-ima-video" src="https://cdn.ampproject.org/v0/am
/* @flow */
type Slide = {| id: number |}
class Test {
slidesWithAds: Array<Slide> = [{id: 2}];
getNonAdSlideIndex(indexWithAds: number): ?Slide {
return this.slidesWithAds[indexWithAds];
}
}
/* @flow */
type Slide = {| id: number |}
class Test {
slidesWithAds: Array<Slide> = [{id: 2}, {id: 4}];
getNonAdSlideIndex(indexWithAds: number): ?Slide {
return this.slidesWithAds[indexWithAds];
}
}
/* @flow */
type Slide = {| id: number |}
class Test {
slidesWithAds: Array<Slide> = [{id: 2}, {id: 4}];
getNonAdSlideIndex(indexWithAds: number): ?Slide {
return this.slidesWithAds[indexWithAds];
}
}

Keybase proof

I hereby claim:

  • I am zmetser on github.
  • I am zmetser (https://keybase.io/zmetser) on keybase.
  • I have a public key ASDolZXb4kgGxGy_enYvIXlcEPVnqwEjI5pw1MPsYbVOKgo

To claim this, I am signing this object:

@Zmetser
Zmetser / .babelrc
Created November 13, 2017 10:41
babelify, browserify, uglifyjs
{
"presets": [
[
"es2015"
]
]
}
@Zmetser
Zmetser / class-union.js
Last active April 10, 2018 14:09
This class union refinement with instanceof takes a lot longer that one'd think. (~10s)
// @flow
class Base {}
class A extends Base {}
class AA extends Base {}
class AB extends Base {}
class AC extends Base {}
class AD extends Base {}
class AE extends Base {}
class AF extends Base {}