Backup (clone) all your own gists

You need to have a personal access token to GitHub. In this script I use my token saved in ~/.github_access_token. Also you need to have the git utility on your system. Install PyGithub package to work with GitHub API pip install PyGithub The gist is actually a git repository. All your gists you can clone as regular repositories into a directory called repos. Script clones gists with names contained the IDs....

March 13, 2022

How to push to GitHub via HTTPS if you have enabled two-factor authentication

If you enabled two-factor authentication in your Github account you won’t be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual. You may also need to update the origin for your repository if set to https:...

July 31, 2021

A dynamic GitHub profile with GitHub Actions

Thanks Yannick Chenot for the article How to Build a Dynamic GitHub Profile with GitHub Actions and PHP! It describes how to set up automatic updating of links to the latest blog posts in the GitHub profile using GitHub Actions. I will not retell the article, and you can read about the profile on GitHub here. Here is my python solution import requests from bs4 import BeautifulSoup url = "https://vostbur.github.io" main_page = BeautifulSoup(requests....

July 22, 2021

Setup a basic workflow using GitHub Actions with Docker

In the continuation of the post “Creating dockerized Django app with VSCode”, I updated the source code to work with GitHub Actions. Setup a basic workflow using GitHub Actions Add to the requirements.txt file the following line to check with linter: flake8>=3.9.2,<3.10 Create a new file at .github/workflows/cd.yml and fill it with the following contents: --- name: Code checks on: push: branches: [ master ] pull_request: branches: [ master ] jobs: test: name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Test run: docker-compose run --rm ....

June 13, 2021