To review the information contained in a certificate use the openssl command: openssl x509 -in mycert.pem -text -noout
Display Link Raspberry Pi
How to connect a DisplayLink HP U160 to a RaspberryPi - and run Chromium in kiosk mode. Edit the file /etc/X11/xorg.conf to read like Section "ServerLayout" Identifier "Server Layout" Screen 0 "DisplayLinkScreen" 0 0 EndSection Section "Files" ModulePath "/usr/lib/xorg/modules" ModulePath "/usr/local/lib/xorg/modules" ModulePath "/usr/local/lib/xorg/modules/drivers" EndSection Section "Device" Identifier "DisplayLinkDevice" Driver "fbdev" Option "fbdev" "/dev/fb0" #Option "ShadowFB" "off" EndSection Section "Monitor" Identifier "DisplayLinkMonitor" EndSection Section "Screen" Identifier "DisplayLinkScreen" Device "DisplayLinkDevice" Monitor "DisplayLinkMonitor" SubSection "Display" Depth 16 Modes "1366x768" EndSubSection EndSection Edit /etc/xdg/lxsession/LXDE-pi/autostart to include...
Pause and Resume Prints With Prusa i3 MK3S+ and Octoprint
Add M601 in Octoprint in the gcode after print paused script section. Prusa i3 MK3S+ with 3.12.2 firmware will move the printhead out of the way, set the nozzle temperature to 0 and keep the printbed at the currently set temperature. Add M602 to the gcode before print resumed script section. Prusa i3 MK3S+ with 3.12.2 firmware will heat the nozzle back to printing temperature and move to the last position before pausing and then resume the print....
Working with Environment Variables in Rust and Rocket
Rust Using environment variables with rust works - at least - two different ways: embedding at compile time with macro std::env env!() reading at runtime with std::env::var(key) The below code uses both methods of accessing environment variables: usestd::env;fn main(){println!("The value of COMPILE_TIME_VARIABLE is: {}",env!("COMPILE_TIME_VARIABLE","$COMPILE_TIME_VARIABLE should be set"));println!("The value of RUNTIME_VARIABLE is: {}",env::var("RUNTIME_VARIABLE").expect("$RUNTIME_VARIABLE should be set"));}Building with no variables set Building the code without setting any environment variables will fail because the COMPILE_TIME_VARIABLE is not set:...
Use Github Secret With Ssh
How to use a Gitea secret in a Gitea action for ssh/sftp Create a secret with the base64 encoded private key as part of the repository settings. Access the secret in an action like this: name:Stage blog changesrun-name:${{ github.actor }} is deploying site to staging πon:[push]jobs:Explore-Gitea-Actions:runs-on:my-ssl-focalsteps:- run:echo "π The job was automatically triggered by a ${{ github.event_name }} event."- name:Check out repository codeuses:actions/checkout@v3- run:|apt-get update apt-get install -y hugo rsync hugo --baseURL https://staging....
Nginx Docker
Private nginx image Use below for nginx.conf: events { worker_connections 1024; } http { include mime.types; sendfile on; server { listen 8080; listen [::]:8080; resolver 127.0.0.11; autoindex off; server_name _; server_tokens off; root /content; gzip_static on; } } Create Dockerfile: FROM nginx:alpine COPY ./nginx.conf /etc/nginx/nginx.conf Build the image with docker build -t local-nginx . Run with something like docker run -it --rm -v ./content:/content -p 80:8080 --name nginx-site1 local-nginx
Gitea Runner With Self Signed Certificate
Short test of the Gitea 1.19.0 actions feature with a runner executing on an MacBook Air with M1 with OrbStack Gitea Actions Gitea have a great blog post describing all steps to enable and try out the feature. When Gitea is running in a private environment with a self-signed certificate, the images that the runner will use to interact with the Gitea server, eg. to check-out the repository, need to include the root CA certificate....
Print eSun Flexible TPE with Prusa MK3s+
PSA: It is very possible to print eSun Flexible TPE 83A with Pruse MK3s+, these are my settings: Nozzel temperature 230deg C Bed temperature at 65deg C All speeds 20 mm/s First layer at 50% Loosen idler screw Use blue window cleaner as separation agent on smooth sheet Wait for bed to cool down, remove with sharp knife from sheet Update: This is more complicated with Prusa MK4S and Prusa Core One