Skip to content

Instantly share code, notes, and snippets.

View thanakijwanavit's full-sized avatar

Nic Wanavit thanakijwanavit

View GitHub Profile

With GitHub Actions, a workflow can publish artifacts, typically logs or binaries. As of early 2020, the life time of an artifact is hard-coded to 90 days (this may change in the future). After 90 days, an artifact is automatically deleted. But, in the meantime, artifacts for a repository may accumulate and generate mega-bytes or even giga-bytes of data files.

It is unclear if there is a size limit for the total accumulated size of artifacts for a public repository. But GitHub cannot reasonably let multi-giga-bytes of artifacts data accumulate without doing anything. So, if your workflows regularly produce large artifacts (such as "nightly build" procedures for instance), it is wise to cleanup and delete older artifacts without waiting for the 90 days limit.

Using the Web page for the "Actions" of a repository, it is possible to browse old workflow runs and manually delete artifacts. But the procedure is slow and tedious. It is fine to delete one selected artifact. It is not for a regular cleanup. We need

@thanakijwanavit
thanakijwanavit / cognito.yaml
Created December 27, 2020 15:54 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@thanakijwanavit
thanakijwanavit / vimCheatSheet.md
Last active September 12, 2020 13:36 — forked from alsibir/# Vim Cheatsheet
vim cheatsheet

Vim Cheatsheet

Disclaimer: This cheatsheet is summarized from personal experience and other online tutorials. It should not be considered as an official advice.

Global

:help keyword # open help for keyword
:o file       # open file
:saveas file  # save file as
:close        # close current pane
@thanakijwanavit
thanakijwanavit / selenium.py
Last active April 21, 2020 04:41 — forked from korakot/selenium.py
Use selenium in Colab
# install chromium, its driver, and selenium
!apt install chromium-chromedriver
!pip install selenium
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
import sys
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver')
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')