Skip to content

Instantly share code, notes, and snippets.

@kinoute
kinoute / get-md-images.sh
Last active June 11, 2023 11:33
Download remote images from markdown/jupyter notebooks files and update paths from remote to local.
#!/bin/bash
###################################################################
# Script Name : get-md-images.sh
# Description : Download all remote images written as markdown
# in our files and replace URLs by local path.
# Author : Yann Defretin
# Email : yann@defret.in
###################################################################
@mlocati
mlocati / color-scale.js
Last active May 1, 2024 10:55
Javascript color scale from 0% to 100%, rendering it from red to yellow to green
// License: MIT - https://opensource.org/licenses/MIT
// Author: Michele Locati <michele@locati.it>
// Source: https://gist.github.com/mlocati/7210513
function perc2color(perc) {
var r, g, b = 0;
if(perc < 50) {
r = 255;
g = Math.round(5.1 * perc);
}
else {