Skip to content

Instantly share code, notes, and snippets.

View abompard's full-sized avatar

Aurélien Bompard abompard

View GitHub Profile
#!/usr/bin/env python3
# Author: abompard
# https://pagure.io/fedora-infrastructure/issue/10899
#
# This scripts requires the shovel plugin to be enabled:
# Check with:
# # rabbitmq-plugins is_enabled rabbitmq_shovel
# Enable with:
# # rabbitmq-plugins enable rabbitmq_shovel
@abompard
abompard / get-koji-builds.py
Created May 24, 2022 08:57
Get RPMs built in Koji
#!/usr/bin/env python3
from argparse import ArgumentParser
from subprocess import run
import requests
def get_task_rpms(taskid):
base_url = f"https://kojipkgs.fedoraproject.org/work/tasks/{taskid[-4:]}/{taskid}"
Updating dependencies
Resolving dependencies...
1: fact: poetry-test is 0.1.0
1: derived: poetry-test
1: fact: poetry-test depends on libcomps (>=0.1.18)
1: selecting poetry-test (0.1.0)
1: derived: libcomps (>=0.1.18)
1: fact: no versions of libcomps match >=0.1.18
1: conflict: no versions of libcomps match >=0.1.18
1: ! libcomps (>=0.1.18) is satisfied by libcomps (>=0.1.18)
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Aurélien Bompard <aurelien@bompard.org>"]
[tool.poetry.dependencies]
python = "^3.10"
libcomps = ">=0.1.18"
@abompard
abompard / setup-vscode-python.py
Last active July 22, 2020 13:52
A python script to setup VS Code with Poetry's virtualenv and some other defaults
#!/usr/bin/env python3
import os
import json
from subprocess import run, PIPE
GLOBAL_SETTINGS_VALUES = {
"python.venvPath": "~/.cache/pypoetry/virtualenvs/",
"python.linting.flake8Enabled": True,
@abompard
abompard / rename-git-branch.sh
Last active June 23, 2020 10:43
Rename the git master branch
#!/bin/sh
OLD=master
NEW=dev
ORIGIN=`git remote -v | awk '/git@github.com:fedora-infra/ {print $1}' | head -1`
set -e -x
git fetch -p ${ORIGIN}
git branch -m ${OLD} ${NEW}
Verifying that +abompard is my blockchain ID. https://onename.com/abompard

Keybase proof

I hereby claim:

  • I am abompard on github.
  • I am abompard (https://keybase.io/abompard) on keybase.
  • I have a public key whose fingerprint is 03E9 93DA D931 3E51 8FCA 35FF 3158 4CFE B9BF 64AD

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am abompard on github.
  • I am abompard (https://keybase.io/abompard) on keybase.
  • I have a public key whose fingerprint is 03E9 93DA D931 3E51 8FCA 35FF 3158 4CFE B9BF 64AD

To claim this, I am signing this object: