Skip to content

Instantly share code, notes, and snippets.

View davosian's full-sized avatar

Dennis Staiger davosian

  • Ennovations.net
  • Switzerland
View GitHub Profile
@davosian
davosian / script.sh
Created September 29, 2021 10:59
Delete all evicted pods
kubectl get pods --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete pods \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c
@davosian
davosian / cloud-init.yaml
Created January 3, 2022 20:46 — forked from pmbaumgartner/cloud-init.yaml
Multipass & Docker Setup
#cloud-config
package_upgrade: true
ssh_authorized_keys:
- <your key>
packages:
- apt-transport-https
- ca-certificates
- curl
@davosian
davosian / migrate-nexus-to-github-packages.md
Created January 5, 2022 13:27 — forked from karlvr/migrate-nexus-to-github-packages.md
A small bash script to migrate Maven packages from Sonatype Nexus to GitHub Packages

Migrate Maven packages from Sonatype Nexus to GitHub Packages

This gist describes the process we've used to migrate our Maven package repository from Sonatype Nexus to GitHub Packages. The same process could be used for migrating any Maven package repo that is in the standard layout.

We created a special repository on GitHub to hold all of our Maven packages. You might decide to migrate packages to different repositories, in which case invoke the script multiple times.

The script uses find to look for all of the folders containing poms and upload them. You specify the folder

@davosian
davosian / add_unique_todo.yaml
Created March 21, 2024 21:54 — forked from andrew-codechimp/add_unique_todo.yaml
Home Assistant - Add unique to-do item
alias: Add unique to-do
mode: single
icon: mdi:clipboard-list
sequence:
- service: todo.get_items
target:
entity_id: "{{ list }}"
data:
status: needs_action
response_variable: mylist

You will need ssh access to your USG. I suggest running sudo su so you're the root user throughout

Installation

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your USG's processor.
curl https://pkgs.tailscale.com/stable/tailscale_1.36.1_mips64.tgz | tar xvz -C /tmp
mv /tmp/tailscale_1.36.1_mips64 /config/tailscale