Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / README.md
Last active November 22, 2023 19:40
pfSense IPSec VPN Status
View README.md
@FlorianHeigl
FlorianHeigl / mix-qr.zpl
Created August 31, 2023 18:17
zpl tests
View mix-qr.zpl
^XA
^FO20,10^BQ,2,4^FDMM,Ahttp://netbox.ifz-muenchen.de/obj-demo-url^FS
^FO145,10^BQ,2,3^FDMM,AHALLO ICH BIMS^FS
^CF0,20
^FO143,100^FDsw-demo^FS
^XZ
@FlorianHeigl
FlorianHeigl / match-cables.py
Last active August 29, 2023 17:58
cable barcode id matcher
View match-cables.py
$ cat gpt-matchcables.py
#!/usr/bin/python3
import re
import csv
# Initialize dictionaries to store data from both CSV files
switchports_data = {}
patch_panels_data = {}
@FlorianHeigl
FlorianHeigl / nagios-oxidized.rb
Created June 25, 2023 19:55
Oxidized nagios check
View nagios-oxidized.rb
#!/usr/bin/env ruby
## contrib via https://github.com/ytti/oxidized/issues/67
require 'open-uri'
require 'json'
critical = false
pending = false
critical_nodes = []
@FlorianHeigl
FlorianHeigl / nc-update.sh
Created June 19, 2023 18:43
nextcloud upgrade script with collection of db fixes, some notes for fixing typical errors with nextcloud-docker
View nc-update.sh
#!/bin/bash -u
occ_wrapper='docker exec -it -u 33 nextcloud-app /var/www/html/occ'
mysql_wrapper='docker exec nextcloud-db mysql nextcloud'
upgrades_db() {
_scmds="db:add-missing-columns
db:add-missing-indices
db:add-missing-primary-keys
db:convert-filecache-bigint
@FlorianHeigl
FlorianHeigl / CentOS-Stream-AppStream.repo
Created June 11, 2023 18:23
CentOS 8 / Stream Config with local country mirrors and selecting fastest of those.
View CentOS-Stream-AppStream.repo
[appstream]
name=CentOS Stream $releasever - AppStream
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra&cc=de
#baseurl=http://mirror.centos.org/$contentdir/$stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
@FlorianHeigl
FlorianHeigl / delete-old-snaps.ps1
Last active May 10, 2023 16:09
powershell delete vss snapshots via wmi
View delete-old-snaps.ps1
# source: https://github.com/MSAdministrator/PoshCodeMarkDown/blob/master/docs/Delete-Old-Shadow-Copies.ps1.md
# modified...
# TODO: only handle c:
# TODO: Never delete the last snapshot, or even better the last two?
Get-WmiObject Win32_Shadowcopy | ForEach-Object {
.InstallDate $strShadowID = $.ID $dtmSnapShotDate = [management.managementDateTimeConverter]::ToDateTime($WmiSnapShotDate) $strClientAccessible = $_.ClientAccessible $dtmCurDate = Get-Date
$dtmTimeSpan = New-TimeSpan $dtmSnapShotDate $dtmCurDate $intNumberDays = $dtmTimeSpan.Days
@FlorianHeigl
FlorianHeigl / log.txt
Created May 1, 2023 20:37
Mellanox Crossflash 40g - log from successful attempt
View log.txt
https://schroederdennis.de/allgemein/mellanox-connectx-3-40gbit-ethernet-unlock-freischalten-crossflashing-anleitung-tutorial-howto/#comment-1573
~# ls -l
total 3872
-rw-r--r-- 1 root root 2666684 Mar 17 2021 2103011801.7z
-rw-r--r-- 1 root root 485262 Nov 15 12:37 fw-ConnectX3-rel-2_36_5000-ConnectX3-A1-JFP-QDR.bin.zip
-rw-r--r-- 1 root root 796616 Nov 15 12:37 fw-ConnectX3-rel-2_42_5000-MCX353A-FCB_A2-A5-FlexBoot-3.4.752.bin
-rw-r--r-- 1 root root 5120 Nov 15 12:33 fwsettings.ini
drwxr-xr-x 2 root root 6 Feb 24 2021 tmp
@FlorianHeigl
FlorianHeigl / verinice.ini
Created May 1, 2023 20:35
something for fixing the java env of verinice or starting the server
View verinice.ini
-startup
plugins/org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.200.v20210429-1609
-data
@user.home/verinice/workspace
-vmargs
-Xms512m
-Xmx4g
-Dorg.osgi.service.http.port=8800
View gist:41dc7c6616729e50b60451a8153f3375
$AllRegAppEntries = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | ForEach-Object {Get-ItemProperty -Path $_.pspath}
$FilteredApps = New-Object System.Collections.ArrayList
foreach ($App in $AllRegAppEntries) {
if ($App.DisplayName -ilike "*chromi*") {
Write-Host $App