sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
Add yourself to the docker
group to be able to run containers as non-root (see Post-install steps for Linux).
# To permanently cache the credentials | |
git config --global credential.helper store | |
# To ignore files that could cause issues across different workspaces | |
touch .gitignore | |
echo ".obsidian/cache | |
.trash/ | |
.DS_Store" > .gitignore |
// https://golangcode.com/download-a-file-with-progress/ | |
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"strings" |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
def upsert(session, model, rows): | |
table = model.__table__ | |
stmt = postgresql.insert(table) | |
primary_keys = [key.name for key in inspect(table).primary_key] | |
update_dict = {c.name: c for c in stmt.excluded if not c.primary_key} | |
if not update_dict: | |
raise ValueError("insert_or_update resulted in an empty update_dict") | |
stmt = stmt.on_conflict_do_update(index_elements=primary_keys, |
docker run -d --restart=unless-stopped \ | |
--name rancher \ | |
-p 80:80 -p 443:443 \ | |
-v $HOME/srv/rancher:/var/lib/rancher \ | |
--privileged \ | |
rancher/rancher |
#!/usr/bin/env bash | |
set -euo | |
k3s-uninstall.sh | |
docker container kill $(docker ps -q) |
# Instructions | |
# 1. Update your /etc/hosts file... | |
# > 127.0.0.1 gitea drone | |
# 2. Run gitea + gitea-db and generate the oauth application | |
# > docker-compose -p gitea-drone up gitea gitea-db | |
# - Navigate to http://gitea:3000 to finish the installation and register a user | |
# - Create a oauth application as described here: https://docs.drone.io/installation/providers/gitea/ | |
# - Set the Redirect uri to http://drone:8000/login | |
# 3. Update the docker-compose file with the client_id and client_secret | |
# 4. Fire up all of the services |
This environment is dependent off a common network for docker/git plugin and gitea-server, so for this work fine in closed networks we have to create a custom network before run this composefile.
First create your network:
docker network create gitea-network