Solution: Pass --node-name=example as parameter to the server or agent command.
services:
server:
image: rancher/k3s:v1.32.0-k3s1
command:
- serverMy current directory structure can result in lengthy directory paths, which can make for difficult bash prompts with Fedora's default prompt. To deal with this, I constructed a bash prompt that allows for lengthy directory paths without impacting where the cursor for the command begins.
# set prompt: <horizontal line>\n<green>user@hostname</green>:<cyan>current directory</cyan>\n<yellow>time</yellow> $
export PS1="\[\033[1;30m\]$(printf '─%.0s' {1..80})\n\[\033[0;32m\]\u@\h\[\033[0m\]:\[\033[0;36m\]\w\[\033[0m\]\n\[\033[0;33m\]\t\[\033[0m\] $ "I find myself frequently creating one-off repos to test a concept or technology. To streamline this process, I have written a bash function and included it in my bashrc configuration.
When invoked, it creates a new directory, creates a mercurial repository preconfigured for git integration with a main bookmark activated, creates a README.md file, and then opens the directory in my editor of choice (VSCode).
While VSCode supports opening terminals in the editor area, its shortcuts are generally hard-coded to deal with the terminal in the bottom-panel. To change this, we can define keyboard shortcuts to mitigate and make the "ctrl+`" functionality toggle between the terminal and the last editor used.
| services: | |
| forgejo: | |
| image: codeberg.org/forgejo/forgejo:1.19.3-0 | |
| tmpfs: ["/data"] | |
| stop_signal: SIGKILL | |
| ports: [ "3000:3000", "8000:8000" ] | |
| environment: | |
| # @see https://docs.gitea.com/next/administration/config-cheat-sheet | |
| GITEA__database__DB_TYPE: sqlite3 |
| <?php | |
| declare(strict_types=1); | |
| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Todo extends Model | |
| { |
| <?php | |
| declare(strict_types=1); | |
| pcntl_async_signals(true); | |
| pcntl_signal(SIGHUP, function ($signal) { | |
| echo "HUP! {$signal} \n"; | |
| error_log((new Exception())->getTraceAsString()); | |
| }); |
| # export current environment | |
| EXISTING_ENV=$(export -p) | |
| # import variables from file | |
| . config.env | |
| # import previous environment | |
| source <(echo "$EXISTING_ENV") | |
| # At this point, only variables from config.env that did |
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <dir>" | |
| exit 1 | |
| fi | |
| DIR="$(realpath $1)" | |
| find_unused_classes() |
| #!/bin/bash | |
| TARGET_DIR=/opt/repos/third-parties | |
| HG_GIT_VERSION=${1:-default} | |
| HG_RELEASE_VERSION=${2:-5.5.2} | |
| HG_REPO_VERSION=${3:-stable} | |
| TORTOISEHG_VERSION=${4:-stable} | |
| update() { | |
| # Update packages |