Skip to content

Instantly share code, notes, and snippets.

View epilys's full-sized avatar

Manos Pitsidianakis epilys

View GitHub Profile
@broofa
broofa / checkForUndefinedCSSClasses.js
Last active June 22, 2025 08:19
ES module for detecting undefined CSS classes (uses mutation observer to monitor DOM changes). `console.warn()`s undefined classes.
/**
* Sets up a DOM MutationObserver that watches for elements using undefined CSS
* class names. Performance should be pretty good, but it's probably best to
* avoid using this in production.
*
* Usage:
*
* import cssCheck from './checkForUndefinedCSSClasses.js'
*
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render())
@rain-1
rain-1 / docker node tip.txt
Last active December 24, 2021 07:04
Easily build NodeJS projects inside a docker container
Here's a quick dockerfile:
----------------8<-------------[ cut here ]------------------
FROM debian:latest
RUN apt-get update && apt-get install -y nodejs npm
----------------8<-------------[ cut here ]------------------
save that as Dockerfile and do: docker build -t node-builder .
@andrewstiefel
andrewstiefel / feed.xml
Created January 24, 2022 18:43
Simple XSL boilerplate for styling Atom feeds in Jekyll
---
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/" rel="alternate"/>
@benjamindblock
benjamindblock / example.groff
Last active December 13, 2024 02:08
GNU roff (groff) - a sane example for text files
\# Ref: https://www.gnu.org/software/groff/manual/html_node/gtroff-Reference.html
\# Ref: `man 7 groff`
\# Basic groff file that can be used for formatting a plain text document.
\# These are some sane defaults and examples for writing documents.
\#
\# Hyphenation modes 1, 4, 8 enabled
\# Eg., Do not hyphenate the first or last two letters.
.hy 12
\#
\# Number of characters per-line in the \nl register.
@h3r2tic
h3r2tic / raymarch.hlsl
Last active March 2, 2026 19:55
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"
@jake-stewart
jake-stewart / color256.md
Last active March 5, 2026 05:11
Terminals should generate the 256-color palette

Terminals should generate the 256-color palette from the user's base16 theme.

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.