Skip to content

Instantly share code, notes, and snippets.

View lowlighter's full-sized avatar
🦑
プレゼント・デイ ■ プレゼント・タイム ■

Simon Lecoq lowlighter

🦑
プレゼント・デイ ■ プレゼント・タイム ■
View GitHub Profile
@lowlighter
lowlighter / _itsudeno.md
Last active August 5, 2021 07:47
Itsudeno

🍣 Itsudeno (Coming soon!)

A scriptable IT automation system written in TypeScript and powered by Deno. It can be used to easily deploy and configure applications, services and networks on hosts.

@lowlighter
lowlighter / licenses.ts
Last active March 14, 2021 21:58
Licensed polyfill for metrics with deno projects
/* Copyright 2021 lowlighter. See https://github.com/lowlighter/deno-template
* This is a polyfill to make github/licensed works with deno and lets lowlighter/metrics generates licenses svg
*/
//Loads deno info
const deps = await Promise.all([...new Set<string>(JSON.parse(new TextDecoder().decode(await Deno.run({cmd:["/root/.deno/bin/vr", "info"], stdout:"piped"}).output())).modules
//Get specifier, transform it to url, filter out local deps and extract dependency name
.map(({specifier}:{specifier:string}) => new URL(specifier))
.filter((url:URL) => url.origin !== "null")
.map((url:URL) => `${url.origin}${url.pathname.match(/^(?<name>[/][\s\S]+@v?\d+[.]\d+[.]\d+[/])/)?.groups?.name}`))]
//Fetch licenses