This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save this file as `up.nu` and source it in your NuShell environment | |
# To load it automatically, add `use path/to/up.nu` to `$nu.config-path` | |
export def main [] { | |
if (which apt | is-not-empty) { | |
print $'(tput bold)→ Upgrading packages(tput sgr0)' | |
sudo apt update --fix-missing | |
sudo apt install --fix-broken | |
sudo apt full-upgrade -y | |
sudo apt autoremove -y --purge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A script to upgrade all packages and check if a reboot is required | |
# Save this file as `up.sh` or add the function directly to `~/.bashrc` or `~/.zshrc` | |
# To make this script executable and accessible globally, move it to `/usr/local/bin/up` and run `chmod +x /usr/local/bin/up` | |
up() { | |
echo -e "\033[1m→ Upgrading packages\033[0m" | |
if command -v apt >/dev/null; then | |
sudo apt update --fix-missing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Download commit history from a GitHub repository for a specific user. | |
This script fetches all commits authored by a specified user from a GitHub repository | |
and formats them in a Markdown-compatible format. The output includes commit titles, | |
timestamps, and commit messages. | |
To use this script, first install its dependencies: | |
pip install PyGithub==2.5.0 typer==0.15.1 |