Skip to content

Instantly share code, notes, and snippets.

View Salamafet's full-sized avatar

Stéphane Salamafet

View GitHub Profile
@Salamafet
Salamafet / gist:fea0cac0503af761e7910cf6c833e9aa
Created July 28, 2020 19:38
Ultimate Cura gcode start sequence : Heating and bed leveling at same time
M140 S{material_bed_temperature} ; start preheating the bed WITHOUT wait to what is set in Cura
M104 S{material_print_temperature} T0 ; start preheating hotend WITHOUT wait to what is set in Cura
M280 P0 S160 ; BLTouch alarm release
G4 P100 ; delay for BLTouch
G28 ; home
G29 ; auto bed leveling
M190 S{material_bed_temperature} ; start heating the bed to what is set in Cura and WAIT
@Salamafet
Salamafet / info.md
Created September 3, 2020 05:45
ZSH and Snap

Get Snap App appears in system Menu with ZSH

Edit zprofile file: sudo nano /etc/zsh/zprofile

Add this line: emulate sh -c 'source /etc/profile'

Save and restart session

@Salamafet
Salamafet / check_certificate.sh
Created August 30, 2022 12:26
Gotify notification when certificate expire
#!/bin/bash
certificat=/usr/certificate/example.com/cert.pem
gotify_url="https://push.example.com/message?token=xxxxx"
gotify_title="Synology Certificate Expiry"
function check_certificat () {
if openssl x509 -checkend $((${1}*86400)) -noout -in $certificat; then
return 1
else
@Salamafet
Salamafet / firefox_pwa_outlook_config.md
Created April 3, 2023 06:30
Firefox PWA Outlook Config

Configure PWA to open external URLs in the default browser

  • Go to PWA Settings
  • Select Open out-of-scope URLs in the default browser (can break some web apps).
    The Force links into a new window option should be selected automatically

To work properly at loading of Outlook, you need to allow some domains
In the Domains always allowed to be opened in the PWA browser add:
outlook.office.com,res.cdn.office.net,eu-office.events.data.microsoft.com,clients.config.office.net