Skip to content

Instantly share code, notes, and snippets.

View meinefinsternis's full-sized avatar
🤠
Focusing

meinefinsternis

🤠
Focusing
View GitHub Profile
@herlon214
herlon214 / next.config.js
Created July 3, 2022 02:47
NextJS 12 Hash Class Names
const path = require('path')
const loaderUtils = require('loader-utils')
const hashOnlyIdent = (context, _, exportName) => {
const result = loaderUtils
.getHashDigest(
Buffer.from(
`filePath:${path
.relative(context.rootContext, context.resourcePath)
.replace(/\\+/g, '/')}#className:${exportName}`
@nicolaskopp
nicolaskopp / ios-fixed-scrolling-fix.css
Last active September 11, 2025 02:45
Fix scrolling bug on iOS Safari with fixed elements and bottom bar
/* Fix scrolling bug on iOS Safari with fixed elements and bottom bar */
body.noscroll {
height: 100%;
overflow: hidden; /* make sure iOS does not try to scroll the body first */
}
/* your wrapper, most likely mobile menu */
.fixed-wrapper {
width: 100%;
@debkanchan
debkanchan / regex.md
Last active February 27, 2025 10:17
RegEx for Latitude and Longitude

Regular Expression(RegExp) for Latitude and Longitude

Just Latitude:

^-?([0-8]?[0-9]|90)(\.[0-9]{1,10})$

matches:

  • 56.3847
  • -56.387

unmatches:

@estorgio
estorgio / prettier-eslint-precommit.md
Last active July 13, 2025 10:34
Setting up Prettier and ESLint with pre-commit hook

Setting up Prettier and ESLint with pre-commit hook

  • Initialize Git repository
    git init
  • Create .gitignore file and add the following:
    node_modules/
    *.env
    
// POLYFILLS
// Event.composedPath
// Possibly normalize to add window to Safari's chain, as it does not?
(function(E, d, w) {
if(!E.composedPath) {
E.composedPath = function() {
if (this.path) {
return this.path;
}
var target = this.target;
@GoodMattwin
GoodMattwin / README.md
Last active March 12, 2022 15:31
Simple bash script to generate react component boilerplate

make_compnent.sh

This is a simple bash script to generate React Component boilerplate. Save make_component.sh in /usr/local/bin to use script with out a path:

Beginning in the directory where you saved make_components.sh, you can use these commands:

$ mv make_component.sh /usr/local/bin
$ cd path/to/your/jammming/src/Components
$ make_component.sh ComponentName
@chranderson
chranderson / nvmCommands.js
Last active April 30, 2026 16:40
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@Jekins
Jekins / Markdown-docs.md
Last active April 30, 2026 10:58
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
@franz-josef-kaiser
franz-josef-kaiser / nano-shorts.md
Last active August 2, 2025 10:30
nano keyboard shortcuts

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@mjackson
mjackson / color-conversion-algorithms.js
Last active January 4, 2026 08:45
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation