I hereby claim:
- I am viliamkopecky on github.
- I am viliamkopecky (https://keybase.io/viliamkopecky) on keybase.
- I have a public key ASDovpmshl5RlF9blUYjcFOGva0XrOU5rqAU7_wP6JPargo
To claim this, I am signing this object:
var docWidth = document.documentElement.offsetWidth; | |
[].forEach.call(document.querySelectorAll("*"), function (el) { | |
if (el.closest("svg")) { | |
return null; | |
} | |
if ( | |
el.offsetWidth > docWidth || | |
el.getBoundingClientRect().right > docWidth | |
) { | |
console.log({ |
(() => { | |
const data = {}; | |
document.querySelectorAll("*").forEach((el) => { | |
const style = window.getComputedStyle(el); | |
const font = String(style.fontFamily).split(",").shift().replace(/\"/g, ''); | |
data[font] = data[font] ?? {}; | |
data[font][style.fontWeight] = data[font][style.fontWeight] ?? 0; | |
data[font][style.fontWeight]++; | |
}); | |
console.log(JSON.stringify(data, null, 2)); |
My Awesome Sketch | |
First State | |
some event -> Trololo | |
Trololo |
<?php | |
/* | |
# Usage | |
# just prefix old function call with `Memoize::` | |
someFunction("foo", 123); | |
Memoize::someFunction("foo", 123); |
=overscrolls($topColor, $bottomColor, $darken: 10%) | |
@if $topColor | |
body::before | |
content: '' | |
position: fixed | |
right: 0 | |
left: 0 | |
z-index: -1 |
I hereby claim:
To claim this, I am signing this object:
<?php | |
function templateString($subject, array $replace, $l = '%', $r = NULL) { | |
if(!$r) { | |
$r = $l; | |
} | |
return str_replace(array_map(function($s) use ($l, $r) { return "$l$s$r"; }, array_keys($replace)), array_values($replace), $subject); | |
} |
<?php | |
function yid($url) { | |
$pattern = '%^(?:https?://)?(?:www\.)?(?:youtu\.be/|youtube\.com(?:/embed/|/v/|/watch\?v=))([\w-]{10,12})$%x'; | |
$result = preg_match($pattern, $url, $matches); | |
if ($result) { | |
return $matches[1]; | |
} | |
return false; | |
} |
{ | |
"Potrefená Husa": "https://www.zomato.com/cs/praha/potrefen%C3%A1-husa-n%C3%A1rodn%C3%AD-nov%C3%A9-m%C4%9Bsto-praha-1/menu", | |
"Bistro OS": "https://www.zomato.com/cs/praha/bistroos-nov%C3%A9-m%C4%9Bsto-praha-1/menu", | |
"U Medvídků": "https://www.zomato.com/cs/praha/restaurace-u-medv%C3%ADdk%C5%AF-star%C3%A9-m%C4%9Bsto-praha-1/menu", | |
"Modrá zahrada": "https://www.zomato.com/cs/praha/modr%C3%A1-zahrada-star%C3%A9-m%C4%9Bsto-praha-1/menu", | |
"La Piccola Perla": "https://www.zomato.com/praha/la-piccola-perla-star%C3%A9-m%C4%9Bsto-praha-1/menu", | |
"Café Louvre": "https://www.zomato.com/praha/caf%C3%A9-louvre-nov%C3%A9-m%C4%9Bsto-praha-1/menu", | |
"Hlávkův Dvůr": "https://www.zomato.com/praha/hl%C3%A1vk%C5%AFv-dv%C5%AFr-1-nov%C3%A9-m%C4%9Bsto-praha-1/menu" | |
} |
<!-- definice SVG spritu -->
<svg class="shape-defs" width="0" height="0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="shape-star" viewBox="0 0 23 21">
<path d="M11.5 16.34l-5.43 2.85 1.04-6.04-4.39-4.28
6.07-.88 2.71-5.49 2.71 5.49 6.07.88-4.39 4.28 1.04 6.04-5.43-2.85zm0 0"/>
</symbol>