Skip to content

Instantly share code, notes, and snippets.

View felladrin's full-sized avatar

Victor Nogueira felladrin

View GitHub Profile
@mlocati
mlocati / color-scale.js
Last active October 25, 2024 13:11
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 <[email protected]>
// 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 {
@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 : [email protected]
###################################################################