Skip to content

Instantly share code, notes, and snippets.

View revolunet's full-sized avatar
🐫
Killing bugz

Julien Bouquillon revolunet

🐫
Killing bugz
View GitHub Profile
@revolunet
revolunet / api.js
Last active December 20, 2024 14:00
Scaleway GenAI example with fetch
const query =
"Fais-moi un texte de RAP à la gloire de betagouv et formattes le en markdown";
const res = fetch(
"https://api.scaleway.ai/xxx",
{
method: "POST",
headers: {
Authorization: "Bearer xxx",
"Content-Type": "application/json",
@revolunet
revolunet / internet.mjs
Last active December 11, 2024 00:19
Albert internet collection demo
// @ts-check
// run in your browser or with `node internet.mjs` with the ALBERT_API_KEY set below
// see also: https://albert.api.etalab.gouv.fr/documentation
const API_KEY = process.env.ALBERT_API_KEY;
const API_URL = "https://albert.api.etalab.gouv.fr";
const LANGUAGE_MODEL = "AgentPublic/llama3-instruct-8b"; // see https://albert.api.etalab.gouv.fr/v1/models
@revolunet
revolunet / francejs.geojson
Created December 9, 2024 23:30
francejs.geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@revolunet
revolunet / albert.mjs
Last active December 11, 2024 00:18
Albert API With RAG and JavaScript
// @ts-check
// see also: https://albert.api.etalab.gouv.fr/documentation
import { readFile, readdir } from "fs/promises";
import pAll from "p-all";
const API_KEY = process.env.ALBERT_API_KEY;
const API_URL = "https://albert.api.etalab.gouv.fr";
@revolunet
revolunet / test.md
Created November 29, 2024 23:14
test mermaid charts

test mermaid charts

see all on https://mermaid.live

Pie

pie title Pets adopted by volunteers
    "Dogs" : 386
    "Cats" : 85
@revolunet
revolunet / chorus.md
Last active December 12, 2024 15:15
Process commande chorus
@revolunet
revolunet / README.md
Created November 14, 2024 17:55
oauth2-proxy diagram
sequenceDiagram
    participant User
    participant Proxy
    participant GitHub
    participant App
    
    User->>Proxy: Visits protected URL
    Proxy->>User: 302 Redirect to GitHub login
    User->>GitHub: GET /login
@revolunet
revolunet / test.md
Created November 12, 2024 23:22
some links
@revolunet
revolunet / index.md
Last active November 12, 2024 10:51
extract vaultwarden non-2FA users

extract vaultwarden non-2FA users

in the /users/overview browser console:

const table = document.querySelector("table#users-table");
const unsecureUsers = Array.from(table.querySelectorAll("tbody tr")).filter(r=>!r.innerHTML.includes("2FA is enabled")).map(r => r.querySelector("td.sorting_1:first-of-type span.d-block").textContent);
copy(unsecureUsers.join("\n")); // clipboard copy
@revolunet
revolunet / giveaway.md
Last active October 1, 2024 07:08
Dons 28/9/24

Dons 28/9/24

  • Tenues capoiera 8 ans et 12 ans
  • Cocote minute SEB "Clipso"
  • Robot Silvercrest Monsieur cuisine SKMH 1100 A1 avec accessoires vapeur
  • Jouet poussette enfant avec deux poupées
  • Jouet lave vaisselle
  • Radio reveil bluetooth MUSE M172-BT
  • BB: ciel lumineux Pabobo SP02B
  • Livre Jeux adulte FibreTigre "Out there l'exil"