Skip to content

Instantly share code, notes, and snippets.

@lcheylus
lcheylus / cosmic-badge.json
Last active October 21, 2026 16:15
JSON file to create a shields.io badge for COSMIC version
{"label":"COSMIC version","message":"Epoch 1.11.0","schemaVersion":1,"color":"blue"}
@lcheylus
lcheylus / download_artifacts.sh
Last active July 28, 2026 09:02
Shell script to list/download artifacts for a GitHub workflow run
#!/usr/bin/env bash
# List/Download artifacts for a workflow run
# from a GitHub repository
set -eu
for cmd in curl jq awk; do
if ! command -v "${cmd}" > /dev/null 2>&1; then
echo "ERROR: required command '${cmd}' is not installed or not in PATH."
exit 1
fi
@lcheylus
lcheylus / nvim_init.lua
Created October 8, 2025 16:35
Minimal configuration file for Neovim
-- Minimal configuration file for Neovim
-- Check if needed commands are available
local function is_command_available(cmd)
-- os.execute returns true (or exit code 0) if the command exists
local result = os.execute('command -v ' .. cmd .. ' >/dev/null 2>&1')
-- Lua 5.2+ returns true on success, or nil/false on failure
-- Lua 5.1 returns status code shifted left (e.g., 0 = success)
if result == true or result == 0 then
@lcheylus
lcheylus / get_covid19_datas.py
Last active March 29, 2020 08:00
Get Covid-19 datas (total cases, deaths) for France by date
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Get datas for Covid-19 in France (2020).
Datas extracted from https://github.com/opencovid19-fr/ (JSON format)
Python script by Laurent Cheylus (foxy@free.fr)
"""