September 12, 2024

Enable Beagle Cam v2 in home assistant

 Source: https://blog.php-systems.com/beagle-cam-v2-and-home-assistant/

The Stream url is:

rtsp://<username>:<password>@<ip or fqdn>:554/1



August 24, 2021

[SOLVED] local gitlab-runner exec docker with custom cntainer registry

 

In case your .gitlab-ci.yaml file has reference for custom docker registry and you get an error

ERROR: Preparation failed: failed to pull image "registry.example.io/foo/dev-base:22.0.2" with specified policies [always]: Error response from daemon: Get https://registry.example.io/v2/foo/dev-base/manifests/0.0.2: denied: access forbidden (manager.go:205:0s)



try to pass your auth key from ~/.docker/config.json file as follows. where AUTH_KEY is the key form this file for your domain 


gitlab-runner exec docker deploy:foo --env DOCKER_AUTH_CONFIG="{\"auths\":{\"registry.example.io\":{\"auth\":\"AUTH_KEY\"}}}"

October 23, 2020

[SOLVED] list recursive permissions for files and folders (also in zip)

find -printf '%M %m %p\n'

drwxrwxr-x 775 .
dr--r--r-- 444 ./ro-folder-single-rw-non-image
-rw-rw-rw- 666 ./ro-folder-single-rw-non-image/audio1.mp3
dr--r--r-- 444 ./ro-folder-single-ro-image
-r--r--r-- 444 ./ro-folder-single-ro-image/250x250.jpg
dr--r--r-- 444 ./ro-folder-single-ro-non-image
-r--r--r-- 444 ./ro-folder-single-ro-non-image/audio1.mp3
drwxrwxr-x 775 ./rw-folder-single-rw-image
-rwxr-xr-x 755 ./rw-folder-single-rw-image/250x250.jpg
dr--r--r-- 444 ./ro-folder-single-rw-image
-rw-rw-rw- 666 ./ro-folder-single-rw-image/250x250.jpg
drwxrwxr-x 775 ./rw-folder-single-rw-non-image
-rwxr-xr-x 755 ./rw-folder-single-rw-non-image/audio1.mp3

zipinfo createdTestData.zip

drwxr-xr-x  2.0 unx        0 bl defN 20-Oct-22 18:16 mixed_types/
-rwxr-xr-x  2.0 unx     4431 bl defN 20-Oct-22 18:16 mixed_types/foo.jpg
-rwxr-xr-x  2.0 unx     4431 bl defN 20-Oct-22 18:16 rw-folder-rw-file/foo.jpg
-rw-rw-rw-  2.0 unx     4431 bl defN 20-Oct-22 18:16 ro-folder-rw-file/foo.jpg
dr--r--r--  2.0 unx        0 bl defN 20-Oct-22 18:16 ro-folder-rw-file/
drwxr-xr-x  2.0 unx        0 bl defN 20-Oct-22 18:16 rw-folder-ro-file/
-rw-rw-rw-  2.0 unx     4431 bl defN 20-Oct-22 18:16 rw-folder-ro-file/foo.jpg
-r--r--r--  2.0 unx     4431 bl defN 20-Oct-22 18:16 ro-folder-ro-file/foo.jpg
dr--r--r--  2.0 unx        0 bl defN 20-Oct-22 18:16 ro-folder-ro-file/

August 31, 2020

[SOLVED] Generate images with numbers

!/bin/bash

FONT="Ani"
for NUMBER in `seq -w 1 20`
do
PREFIXED_NUMBER=${NUMBER}
  convert -size 200x200 -gravity center -fill orange -font "$FONT" label:"$NUMBER" "numbers-${FONT}-${PREFIXED_NUMBER}.png"
done