Skip to content

Instantly share code, notes, and snippets.

@shemig
shemig / matrix.sh
Last active December 19, 2025 04:07
Treat hyprland workspaces as a 3x3 matrix
matrix_size=3
##Utility functions
matrix_max=$(($matrix_size - 1))
function clamp() {
n=$(($1 < 0 ? 0 : $1))
n=$(($n > $matrix_max ? $matrix_max : $n))
echo $n
@vlafiser
vlafiser / anime-js-hover-effect.markdown
Created December 4, 2017 07:30
anime.js hover effect
If 2fa is enabled on github switch to ssh instead of https on linux
1. generate an ssh keypair on your linux box
ssh-keygen -t {rsa|dsa}
2. add the public key to github: profile - settings - ssh keys
3. switch from https to ssh
Check your repo remote:
@983
983 / frag.glsl
Created November 14, 2015 09:39
hsv rgb conversion glsl shader
// because http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl is often down
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
@flaviut
flaviut / box-drawing.md
Last active January 22, 2026 14:30
Box Drawing characters with examples

Box drawing fun

A few boxes drawn with Unicode box drawing characters:

╔═╦═╗
╠═╬═╣
║ ║ ║
╚═╩═╝
@staltz
staltz / introrx.md
Last active January 31, 2026 10:10
The introduction to Reactive Programming you've been missing