Skip to content

Instantly share code, notes, and snippets.

@peavers
peavers / purge.sh
Created March 24, 2021 16:45
Bulk delete workflows from GitHub Actions
# Requires GitHub CLI installed and authenticated.
export USER=""
export REPO=""
export BRANCH="master"
gh api repos/$USER/$REPO/actions/runs | jq -r '.workflow_runs[] | select(.head_branch == "master") | "\(.id)"' | xargs -n1 -I % gh api repos/$USER/$REPO/actions/runs/% -X DELETE > out.log 2> /dev/null
@Vicfred
Vicfred / nginx_uwsgi_flask_gentoo.md
Last active March 22, 2024 12:51
nginx + uwsgi + flask in gentoo and openrc

Instalacion

Instalamos los paquetes necesarios, primero nginx

# emerge -av www-servers/nginx

Para uwsgi que es un servidor hecho en C para aplicaciones en python (y otros) como no vamos a tener aplicaciones en Ruby o PHP vamos a quitarlos:

en /etc/portage/package.use/uwsgi agregamos:

@martin-ueding
martin-ueding / colorcodes.py
Created November 3, 2012 11:04
Python Colorcodes class
class Colorcodes(object):
"""
Provides ANSI terminal color codes which are gathered via the ``tput``
utility. That way, they are portable. If there occurs any error with
``tput``, all codes are initialized as an empty string.
The provides fields are listed below.
Control: