Skip to content

Instantly share code, notes, and snippets.

View gwennlbh's full-sized avatar
🐟
さかなあああ〜

Gwenn Le Bihan gwennlbh

🐟
さかなあああ〜
View GitHub Profile
@gwennlbh
gwennlbh / net7.d2
Last active July 12, 2024 14:59
infra net7
internet
renater
cluster proxmox: {
hyperviseurs: {
iota
sigma
omega
}
mutation DeleteContribution($user: UID!, $option: LocalID!) {
deleteContribution(user: $user, option: $option) {
...MutationErrors
... on MutationDeleteContributionSuccess {
data {
...List_UserContributions_Pending_remove
...List_UserContributions_Paid_remove
...List_UserContributions_Options_insert
id
}
import requests
from subprocess import run
import json
def create_github_issue(iid: int, title: str, body: str, open = True):
# make sure the issue we will create will have the same number as the one in GitLab
github_last_issue = json.loads( run(["gh", "issue", "ls", "--state", "all", "--limit", "1", "--json", "number"], capture_output=True).stdout.decode('utf-8'))
previous_iid_from_github = github_last_issue[0]['number'] if len(github_last_issue) > 0 else 0
if previous_iid_from_github != iid-1:
print(f"Previous issue in GitHub has number {previous_iid_from_github}, while the next one should be {iid}.")
#!/usr/bin/env ruby
require "pathname"
require "json"
require "tty-prompt"
require "pastel"
conventional = false
LABEL_TO_CONVENTIONAL = {
bug: :fix,
# For PowerShell v7
Invoke-Expression (&starship init powershell)
Invoke-Expression (& { (zoxide init powershell | Out-String) })
Set-PSReadlineOption -EditMode vi
Import-Module posh-git
function mkgitignore {
$params = ($args | ForEach-Object { [uri]::EscapeDataString($_) }) -join ","
@gwennlbh
gwennlbh / fill_po_file.py
Last active October 4, 2025 18:02
Paraglide to Wuchale migration scripts
from pathlib import Path
import json
import re
src = Path(__file__).parent.parent
english = json.loads(Path(src.parent / "messages/en.json").read_text(encoding="utf8"))
french = json.loads(Path(src.parent / "messages/fr.json").read_text(encoding="utf8"))
del english["$schema"]