Official Documentation: http://smarden.org/runit/ Quickstart: https://kchard.github.io/runit-quickstart/
sudo apt-get install runit
Launch runit on startup by running /usr/sbin/runsvdir-start & in /etc/rc.local. Read more
| function prompt_wikimatze_precmd { | |
| git-info | |
| } | |
| function prompt_wikimatze_setup { | |
| setopt LOCAL_OPTIONS | |
| unsetopt XTRACE KSH_ARRAYS | |
| prompt_opts=(cr percent subst) | |
| # Load required functions. |
| #!/usr/bin/env bash | |
| set -eu # do not proceed on error | |
| if [ $# -lt 1 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then | |
| cat <<EOF | |
| Quick command to get a shell inside a running docker container. | |
| Usage: dexec [container_name] [command] |
| # list all tags | |
| git fetch --all --tags --prune | |
| # sort git tags by date | |
| git for-each-ref --sort=taggerdate --format '%(tag)_,,,_%(taggerdate:raw)_,,,_%(taggername)_,,,_%(subject)' refs/tags | awk 'BEGIN { FS = "_,,,_" } ; { t=strftime("%Y-%m-%d %H:%M",$2); printf "%-20s %-18s %-25s %s\n", t, $1, $4, $3 }' | |
| # delete all local tags, and update with list of remote tags | |
| git tag -l | xargs git tag -d && git fetch -t | |
| # get list of all author's emails of the repo |
| #!/bin/bash | |
| # Fork from https://github.com/gkotian/gautam_linux/blob/master/scripts/colours.sh | |
| # Script to show the colours used for different file types | |
| # This is just a more readable version of the 'eval' code at: | |
| # http://askubuntu.com/a/17300/309899 | |
| # A nice description of the colour codes is here: |
| # Add this to your ~/.bashrc file | |
| # Use .bashrc.d directory instead of bloated .bashrc file | |
| # From: https://waxzce.medium.com/use-bashrc-d-directory-instead-of-bloated-bashrc-50204d5389ff | |
| BASHRC_DIR="${HOME}/.bashrc.d" | |
| # Optionally create directory if not exists | |
| if [ ! -d "${BASHRC_DIR}" ]; then | |
| mkdir -p "${BASHRC_DIR}"; | |
| chmod 700 "${BASHRC_DIR}"; | |
| fi | |
| # Load any *.bashrc files in ~/.bashrc.d/ |
| function fish_greeting -d "Greeting message on shell session start up" | |
| echo "" | |
| echo -en " __ " (welcome_message) "\n" | |
| echo -en " >(' ) " (show_date_info) "\n" | |
| echo -en " ) / " "\n" | |
| echo -en " / ( " "Computer specific:\n" | |
| echo -en " / `-----/ " (show_os_info) "\n" | |
| echo -en " \ ~=- / " (show_installation_date) "\n" | |
| echo -en "~^~^~^~^~^~^~^ " (show_cpu_info) "\n" | |
| echo -en "~^~^~^~^~^~^~^ " (show_ram_info) "\n" |
| ''' | |
| Download all MagPis available | |
| ''' | |
| #!/usr/bin/env python3 | |
| # pip install bs4 | |
| import ntpath | |
| import os | |
| import sys | |
| import urllib.request |
| sudo sh -c "echo 'deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free' >> /etc/apt/sources.list" | |
| sudo sh -c "echo 'deb http://deb.debian.org/debian bullseye main contrib non-free' >> /etc/apt/sources.list" | |
| sudo apt-get update | |
| sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXX | |
| Replace XXXXXXXXXX with the first alphanumeric key. | |
| sudo apt-get update | |
| sudo apt-get install kodi |
| ' Hack to workaround the Powershell Console popup running on a Windows Scheduled Task | |
| ' Powershell limitations: https://github.com/PowerShell/PowerShell/issues/3028 | |
| ' | |
| ' Add this file in the same git root directory as the sync.ps1 | |
| ' | |
| Dim shell,command | |
| Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject") | |
| Dim sScriptDir : sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName) | |
| command = "powershell.exe -nologo -File " & sScriptDir & "\sync.ps1" |
Official Documentation: http://smarden.org/runit/ Quickstart: https://kchard.github.io/runit-quickstart/
sudo apt-get install runit
Launch runit on startup by running /usr/sbin/runsvdir-start & in /etc/rc.local. Read more