Skip to content

Collection of miscellanea things

License

Notifications You must be signed in to change notification settings

Grufoony/miscellanea

Repository files navigation

miscellanea

Collection of miscellaneous things

Table of contents

  1. YouTube Downloader
  2. pip Updater
  3. doctest installer
  4. Article Template - LaTeX
  5. GitHub tricks
  6. WSL config file

downloader.py

A python script which help you to download and convert to mp3 from YouTube.

updater.py

A python script which help you to update all python's installed packages with pip.

install_doctest.sh

A simple installer for the C++ library of doctest. It will install the library into usr/doctest/, so it will be accessible with:

#include <doctest/doctest.h>

The script is executed with the command:

./install_doctest.sh

article.tex

A LaTeX template for a scientific article, e.g. a lab report.

GitHub tricks

If you want to delete in local all deleted branches of a repository just do:

git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done

If you want to remove a file from git history you can do:

git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch path_to_file' HEAD
git push --force

WSL config file

My config file for WSL2. You should put it in the Windows user folder.