https://github.com/caub/misc
:bookmark: List of projects & scripts
https://github.com/caub/misc
const data-stars
Last synced: over 1 year ago
JSON representation
:bookmark: List of projects & scripts
- Host: GitHub
- URL: https://github.com/caub/misc
- Owner: caub
- Created: 2015-01-02T15:33:09.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T14:37:00.000Z (over 1 year ago)
- Last Synced: 2025-03-17T15:49:00.493Z (over 1 year ago)
- Topics: const, data-stars
- Language: HTML
- Homepage: https://caub.github.io/misc
- Size: 1.29 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
body {
background: #fafafa;
}
span[data-t]::after {
content: attr(data-t);
}
span[data-s]::before {
content: attr(data-s);
}
span[data-t] {
padding: 2px;
font-size: 80%;
color: white;
font-weight: 600;
}
span[data-stars] {
padding: 6px;
font-size: 80%;
}
span[data-stars]::after {
content: attr(data-stars) "★";
}
### Some projects:
- [As-buffer - convert anything to a nodejs buffer](https://github.com/caub/as-buffer)
- [Base-conversion](https://github.com/caub/base-conv)
- [Color wheel](https://github.com/caub/color-wheel)
- [Color transform](https://github.com/caub/color-tf)
- [CSS minifiers benchmark](https://caub.github.io/css-min-bench)
- [DOM tagged template](https://github.com/caub/dom-tagged-template)
- [Emoji-time](https://github.com/caub/emoji-time)
- [Fetchu - a simple http(s).request/fetch wrapper](https://github.com/caub/fetchu)
- [Github clean useless forks](//caub.github.io/github-clean-forks)
- [Ktree - tree search](https://github.com/caub/ktree)
- [Material-ui-multi-select - a Gitlab-issues-filter-like component](https://github.com/caub/mui-multi-select)
- [Mongo-lazy-connect - simplify mongo connection](https://github.com/caub/mongo-lazy-connect)
- [Pg-tsquery - useful text-search parser](https://github.com/caub/pg-tsquery)
- [Roman-number](https://github.com/caub/roman-number)
- [Svgz - ongoing effort to enhance svgo](https://github.com/caub/svgz)
- [Todo list](https://github.com/caub/todo-list)
### Some scripts:
- [Maze](//caub.github.io/misc/maze)
- [Ruzzle](//caub.github.io/misc/ruzzle)
- [2048 solver](//caub.github.io/misc/2048)
- [Calculator](//caub.github.io/misc/calculator)
- [Chrome vs Firefox versions](//caub.github.io/misc/chrome-firefox-versions)
- [Men vs Women athletic performances](//caub.github.io/misc/men-women-athletics-ratio)
- [Connect-four](//caub.github.io/misc/connect-four)
- [Github self starring ratio](//caub.github.io/misc/gh-self-star)
- [Infinite clock](//caub.github.io/misc/infinite-clock)
- [Minimax](//caub.github.io/misc/minimax)
- [Optimize jpeg/png in browser](//caub.github.io/misc/optim)
- [Population density map in France](//caub.github.io/misc/population-density)
- [Shape-outside](//caub.github.io/misc/shape-outside)
- [Spreadsheet](//caub.github.io/misc/sheet)
- [Streams with fetch](//caub.github.io/misc/stream)
- [Storeganise logo](//caub.github.io/misc/sg-logo)
- [Some logo](//caub.github.io/misc/logo)
### Some other miscellaneous scripts:
- [Gists](https://gist.github.com/caub/public?direction=desc&sort=updated)
- [Leetcode](https://leetcode.com/caub/) ([median-of-sorted-arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/discuss/2504/Median-of-2-sorted-arrays-in-JS), [super-pow](https://leetcode.com/problems/super-pow/discuss/154516/JS-solution-(without-and-with-BigInt)))
- [Repl.it](https://repl.it/@caub)
- [Runkit](https://runkit.com/caub)
- [Blog](http://cauburtin.blogspot.fr)
const Y1 = 32, D1 = Y1 / 370, D2 = (1296-Y1)/(1296-370);
const f = x => x >= 370 ? Y1+D2*(x-370) : D1*x;
const hue = w => Math.floor(360 * w.match(/..?/g).map(s => parseInt(s, 36)).reduce((t,v,i) => t + f(v)*1296**-(i+1), 0));
const tags = [...new Set(Array.from(document.querySelectorAll('span[data-t]'), el => el.dataset.t))];
customStyle.textContent += tags.map(tag => `span[data-t="${tag}"] {
background-color: hsla(${hue(tag)},100%,45%,.85);
}`).join('\n');
document.querySelector('h1 > a').href = '//github.com/caub/misc';
document.querySelectorAll('#some-projects + ul li').forEach(async li => {
const a = li.querySelector('a'), url = new URL(a.href);
const p = url.pathname.slice(1).split('/');
const r = await fetch(`https://api.github.com/repos/${p[p.length-2]||url.hostname.split('.',1)[0]}/${p[p.length-1]}`).then(r => r.json());
if (r.stargazers_count) {
const span = document.createElement('span');
span.dataset.stars = r.stargazers_count;
li.append(span);
}
});