Skip to content

Instantly share code, notes, and snippets.

View Kaleidosium's full-sized avatar

Dania Rifki Kaleidosium

View GitHub Profile
@Kaleidosium
Kaleidosium / fp.yue
Last active March 28, 2025 04:11
Functional Programming utilities for YueScript
-- https://stackoverflow.com/a/11671820
-- e.g: map({1,2,3,4}, (o) -> o * 2) -> {2,4,6,8}
export map = (tbl, fn) ->
out = {}
for k, v in pairs tbl
out[k] = fn v
return out
@Kaleidosium
Kaleidosium / saarna-bluing-algorithm.js
Last active January 8, 2025 03:45
Implementation of Saarna's Bluing Algorithm in JavaScript
/**
* Implementation of Saarna's Bluing Algorithm for generating bluish noise.
*
* This algorithm creates blue noise with a +3 dB per octave power increase.
* Unlike traditional blue noise generation methods that require extensive computation
* to massage random values, this algorithm uses an exponentially decaying running
* average to prevent clumping of values with minimal computational overhead.
*
* The algorithm works by:
* 1. Generating two random values
@Kaleidosium
Kaleidosium / kalreset.css
Created June 14, 2024 00:03
My Personal CSS Reset
/*! kalreset.css v1.0.0 | MIT License
* Based on modern-normalize by sindresorhus,
* A (more) Modern CSS Reset by set.studio,
* and Adrian Roselli's Blog
*/
/*
Document
========
*/
@Kaleidosium
Kaleidosium / Calculus Resources.md
Last active October 6, 2024 11:49
Calculus Resources for Self-Learning
@Kaleidosium
Kaleidosium / How I design Robot Furries.md
Last active January 6, 2023 11:10
An opinionated guide to designing Robot Furries.
@Kaleidosium
Kaleidosium / transgolf.js
Created February 11, 2022 06:25
[Code Golf] Trans Flag in JavaScript Browser Console
console.log(`%c `.repeat(5),...`5CFFABFFFFAB5CF`.match(/.../g).map(c=>`background:#${c};display:block;padding:2%26%`))
@Kaleidosium
Kaleidosium / BudapestMetroMap.bas
Created April 26, 2021 01:04
Budapest Metro Map
5 HOME:HGR2
10 HCOLOR=5:REM Orange OR Red Line
20 HPLOT 0,81 TO 0,72
30 HPLOT 0,72 TO 9,63
40 HPLOT 9,63 TO 36,63
50 HPLOT 36,63 TO 63,90
60 HPLOT 63,90 TO 108,90
110 HCOLOR=2:REM Purple OR Yellow Line
@Kaleidosium
Kaleidosium / UX.md
Last active October 17, 2020 14:46
A list of great UX and Accessibility resources
@Kaleidosium
Kaleidosium / fix_github.css
Last active July 2, 2020 20:47
Fix New GitHub Design Issues
/* ==UserStyle==
@name Fix New GitHub Design Issues
@namespace iamrifki
@version 1.0.1
@description Fixes several things I dislike about the new GitHub redesign
@author Dania Rifki <[email protected]>
==/UserStyle== */
@-moz-document url-prefix("https://github.com/"), url-prefix("https://gist.github.com/") {
/* Add separators back to the file list. */
@Kaleidosium
Kaleidosium / ecosia-scraper.js
Last active March 25, 2020 02:41
IamRifki's Ecosia Scraper.
/**
* ecosia-scraper (c) MIT Dania Rifki <[email protected]>
*
* # Prelude:
* Back in 2019, I was introduced to the Ecosia search engine
* I never really liked it, it was pretty terrible in my opinion.
* Search results are pretty eh, and image results frequently pops up unwanted images.
*
* In 2020, I decided to use it for an image scraping project, why you ask?
* Since nobody uses it anymore, Search results come faster than Bing,