Skip to content

Instantly share code, notes, and snippets.

View myfonj's full-sized avatar

Michal Čaplygin myfonj

View GitHub Profile
@myfonj
myfonj / index.pug
Last active February 27, 2020 02:55
Line through effect 3D
- let text = 'Good day!';
- let arr = text.split('');
h1(role='image' aria-label=text)
each letter in arr
span(class='letter '+letter) #{letter}
@myfonj
myfonj / index.css
Created February 26, 2020 17:20 — forked from stereokai/index.css
Trigonometry in CSS
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
; UTF-8
; BOM required in Autohotkey newer than v1.1.07.03
;
; --- http://www.autohotkey.com/
; +++ http://ahkscript.org/
;
; ;-,-,'-; ;=
;
; + shift
; ^ ctrl
*:not(#\0),
*:not(#\0)::before,
*:not(#\0)::after {
/**/ border-radius : 0 !important; /**/
/**/ text-shadow : none !important; /**/
/**/ box-shadow : none !important; /**/
/**/ text-rendering : optimizespeed !important; /**/
/**/ transition-duration : 0ms !important; /**/
/**/ animation-duration : 0ms !important; /**/
/**/ transition-timing-function : step-start !important; /**/
@myfonj
myfonj / Gboard textual emoticons list
Last active May 27, 2020 11:07
list of all non-emoji emoticons from Gboard Android application
:-)
:^)
^_^
(^^)
:,-)
@myfonj
myfonj / crisp-scaled-images.user.css
Last active June 22, 2020 15:19
Crisp Scaled Images
/* ==UserStyle==
@name Crisp up-scaled images for displays with 150% DPI scale factor (Firefox 74+)
@description Prevents blurry anti-aliased borders between picture sampling areas ("pixels").
@namespace myfonj
@version 1.0.1
@license CC0 - Public Domain
==/UserStyle== */
/*
@myfonj
myfonj / readme.md
Last active July 13, 2020 19:54
Array methods cheatsheet text transcript
@myfonj
myfonj / fb-avatar-tnippet-abbreviated
Created September 14, 2020 22:59
Facebook generated code snippet of avatar image in timeline post retrieved 2020-09-14T21Z
<!--
Facebook generated code snippet of avatar image in timeline post
retrieved 2020-09-14T21Z
- class attributes deleted
- resulting DIVs without attributes omitted
-->
<a role="link" tabindex="-1" aria-hidden="true" href="[…]2CP-R">
<object type="nested/pressable">
<a role="link" tabindex="0" aria-label="[…]" href="[…]3C%2CP-R">
@myfonj
myfonj / console.js
Created September 30, 2020 12:21
horizontal scroll offender analysis
console.log([].filter.call(document.all,(e,c)=>(e.getBoundingClientRect().right+parseFloat((c=getComputedStyle(e)).marginRight)*!(c.position=='absolute'))>document.documentElement.offsetWidth))
@myfonj
myfonj / fojo-poc-minimal.js
Created November 21, 2020 16:33
POC of JavaScript Object class with property order control via setBefore(pivot, key, value) and setFirst(key, value)
class FOJO {
constructor(o) {
this.object = Object.assign({}, o)
this.entries = Object.entries(this.object)
return new Proxy(this, this)
}
ownKeys() {
return Object.keys(this.object)
}
get(target, key) {