Skip to content

Instantly share code, notes, and snippets.

View sayanchowdhury's full-sized avatar

Sayan Chowdhury sayanchowdhury

View GitHub Profile
#!/usr/bin/env python3
"""
Reads "old -> new" pairs from stdin, replaces them in the target files, and
prints which lines were missed (no match found).
"""
import sys
from pathlib import Path
def parse_pairs(stdin_lines):
@sayanchowdhury
sayanchowdhury / demo-flatcar-links
Created August 7, 2025 03:17
demo-flatcar-links

Find the tarball

- https://github.com/ollama/ollama/releases/
- https://github.com/ollama/ollama/releases/download/v0.4.3/ollama-linux-amd64.tgz

Generalizing the URL

from bs4 import BeautifulSoup
with open("txndoc.xml") as fobj:
data = fobj.read()
doc = BeautifulSoup(data, "xml")
responses = doc.find_all("Response")
csv_data = []
for response in responses:
import regex as re
def parse_version(data):
pattern = re.compile(r'\[([^][]+)\](\(((?:[^()]+|(?2))+)\))')
versions = []
for match in pattern.finditer(data):
description, _, url = match.groups()
versions.append((description, url))
return versions
@sayanchowdhury
sayanchowdhury / capz-sysext-readme.md
Last active February 22, 2024 16:30
setup CAPZ - systemd-sysext

CAPZ setup for flatcar-sysext

Environment Variables

Given below are the list of enviroment variables required:

export SUBSCRIPTION_ID="--"
export AZURE_CLIENT_ID="--"
export AZURE_TENANT_ID="--"
export AZURE_CLIENT_SECRET="--"
@sayanchowdhury
sayanchowdhury / README.md
Last active May 2, 2021 11:56 — forked from tormath1/README.md
generateCVE summary from a CVE list

DISCLAIMER: The CVE listed in the example is just for example purpose and might not be related to the package.

Usage example:

Output JSON

$ go run ./main.go -cvefile ./cves.txt -json | jq

{
git config --global url."git@github.com:".insteadOf "https://github.com/"
[url "git@github.com:"]
insteadOf = https://github.com/
title separator verticalSeparator revealOptions
Fedora Hubs
<!--s-->
<!--v-->
transition
fade

Fedora Hubs

A walkthrough the project