Skip to content

Instantly share code, notes, and snippets.

@xerosanyam
xerosanyam / check css.js
Created May 5, 2020 08:59
add this to bookmarklet & see the magic, forked
javascript: (function() {
let domStyle = document.getElementById('domStylee');
if (domStyle) {
document.body.removeChild(domStyle);
return;
}
domStyle = document.createElement("style");
domStyle.setAttribute('id', 'domStylee');
domStyle.append(
['* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }'],
@xerosanyam
xerosanyam / Why not ORM
Created June 8, 2022 17:16
why one should choose any ORM with caution
https://news.ycombinator.com/item?id=19853066
https://www.cs.mcgill.ca/~mxia3/2016/11/18/Statically-typed-PostgreSQL-queries-and-typescript-schemats/
@xerosanyam
xerosanyam / find-culprit.js
Created September 14, 2022 10:39
fixed not working? try this snippet
const selector = '.the-fixed-child';
function findCulprits(elem) {
if (!elem) {
throw new Error(
'Could not find element with that selector'
);
}
let parent = elem.parentElement;
while (parent) {
const {