View homeassistant.yaml
This file contains 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
version: '3.7' | |
services: | |
homeassistant: | |
container_name: home-assistant | |
image: homeassistant/home-assistant:stable | |
ports: | |
- "8123" | |
volumes: | |
- /data/homeassistant:/config | |
- /data/ssl:/ssl |
View setup.sh
This file contains 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
#Flash 32bit os using rpi imager (with ssh and wifi settings) then login via ssh and configure device | |
ssh-import-id-gh gbrayut | |
sudo apt update | |
sudo apt install -y vim feh | |
sudo apt upgrade -y | |
# Copy pictures to rpi | |
scp -r /path/to/slideshow gbrayut@gbrpi3b:~/ | |
# Configure systemd user unit file |
View 01-test-seccomp.yaml
This file contains 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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: runtimedefault-pod | |
spec: | |
containers: | |
- name: test-container | |
image: r.j3ss.co/amicontained | |
command: ["/usr/bin/amicontained"] | |
securityContext: |
View kcc-cloudsql-kms-cmek.yaml
This file contains 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
apiVersion: serviceusage.cnrm.cloud.google.com/v1beta1 | |
kind: Service | |
metadata: | |
name: sqladmin.googleapis.com | |
spec: | |
projectRef: | |
external: projects/gregbray-gke | |
# If error: Per-product, per-project service account not found | |
# Fix using: gcloud beta services identity create --service=sqladmin.googleapis.com --project=gregbray-gke | |
# |
View kcc-gke-kms-cmek.yaml
This file contains 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
# config-connector export //cloudkms.googleapis.com/projects/gregbray-kms/locations/us-central1/keyRings/my-key-ring | |
apiVersion: kms.cnrm.cloud.google.com/v1beta1 | |
kind: KMSKeyRing | |
metadata: | |
annotations: | |
cnrm.cloud.google.com/project-id: gregbray-kms | |
cnrm.cloud.google.com/deletion-policy: abandon | |
name: my-key-ring | |
spec: | |
location: us-central1 |
View testing.sh
This file contains 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
$ uname -a;systemctl --version | |
Linux gbmint02 5.4.0-113-generic #127-Ubuntu SMP Wed May 18 14:30:56 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux | |
systemd 245 (245.4-4ubuntu3.17) | |
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid | |
$ sudo machinectl pull-tar http://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-root.tar.xz | |
$ time /bin/sh -c 'ls /sys/fs/cgroup >/dev/null' | |
real 0m0.006s | |
user 0m0.003s |
View 00-testing.sh
This file contains 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
# The manifest below setups up a simple upload server behind gke ingress. Easiest to test from Cloud Shell or another GCE VM | |
# But there does seem to be a timeout/slowloris mitigation so testing with real world upload speeds is also recommended | |
# Also, the "right" way to do this is chunked uploads and/or direct to GCS signed URLs. | |
# But so far I don't see a reason why GCLB HTTPS LBs wouldn't work | |
# Download test files from http://xcal1.vodafone.co.uk/ | |
curl -vsF file=@5MB.zip http://34.111.109.144:80/upload?token=1234 | |
curl -vsF file=@50MB.zip http://34.111.109.144:80/upload?token=1234 | |
curl -vsF file=@200MB.zip http://34.111.109.144:80/upload?token=1234 |
View 00-test-istio.yaml
This file contains 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
# https://istio.io/latest/docs/reference/config/networking/service-entry/ | |
apiVersion: networking.istio.io/v1beta1 | |
kind: ServiceEntry | |
metadata: | |
name: test-service-entry | |
namespace: testing | |
spec: | |
hosts: | |
- test.service # for host header matching | |
addresses: |
View Reddit-Desktop.user.css
This file contains 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
/* | |
TODO: add header like from https://raw.githubusercontent.com/pyxelr/Dark_Google_Calendar/master/Google-DarkCalendar.user.css | |
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | |
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors | |
#\32 x-container > div:nth-child(1) > div:nth-child(2) | |
#SHORTCUT_FOCUSABLE_DIV > div.subredditvars-r-sofistock | |
#SHORTCUT_FOCUSABLE_DIV div.ListingLayout-outerContainer |
View signal_handle.sh
This file contains 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
# Dockerfile run and has two formats... see https://docs.docker.com/engine/reference/builder/#run | |
RUN <command> # (shell form which by default is /bin/sh -c ...) | |
RUN ["executable", "param1", "param2"] # (exec form... not wrapped in a shell) | |
# Same for entrypoint https://docs.docker.com/engine/reference/builder/#entrypoint | |
ENTRYPOINT command param1 param2 # (shell form https://docs.docker.com/engine/reference/builder/#shell-form-entrypoint-example ) | |
ENTRYPOINT ["executable", "param1", "param2"] # (exec form https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-example ) | |
# and cmd https://docs.docker.com/engine/reference/builder/#cmd | |
CMD command param1 param2 # (shell form) |
NewerOlder