Skip to content

Instantly share code, notes, and snippets.

View josy1024's full-sized avatar

josef lahmer josy1024

View GitHub Profile
@josy1024
josy1024 / rika paro ofen firmware.md
Last active February 23, 2024 10:55
rika paro firmwae update auf 2.29

Firmwaredateien:

  RIKA_a_017_229_Application_PARO_V2.29.585.12.bin
  RIKA_d_017_229_001_TOUCH_PARO.BIN
  RIKA_g_ImageVersion202.bin
  RIKA_r_017_229_ComponentTest_PARO_V2.29.243.02.bin
 RIKA_t_TouchApplication_V2.29.534.04.bin
@josy1024
josy1024 / downsize fat32 32gb sd card.ps1
Last active December 20, 2023 19:39
downsize big sd card to 32gb sd card
# DISKPART>
list disk
list volume
select volume X
delete volume
list volume
@josy1024
josy1024 / webmtogif.ps1
Last active November 12, 2023 20:09
webmotion video files to animated gif file
$webmDirectory = Get-Location
# Get all *.webm files in the current directory
$webmFiles = Get-ChildItem -Path $webmDirectory -Filter *.webm
# Loop through each *.webm file and convert it to *.gif
foreach ($webmFile in $webmFiles) {
# Build the ffmpeg command
$ffmpegCommand = "ffmpeg.exe -i `"$($webmFile.FullName)`" -vf `"fps=15,scale=498:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse`" -loop 1 `"$($webmFile.FullName).gif`""
@josy1024
josy1024 / Get-ConfigurationfromJSON.ps1
Created November 8, 2023 23:25
simple get-configuration from json array (file)
function Get-ConfigurationfromJSON {
<#
.SYNOPSIS
json array config file
.DESCRIPTION
use a json config file
.EXAMPLE
# $config = Get-Configuration -match "2" -config .\mandant.json
# $config.ConfigValue
#>
@josy1024
josy1024 / SH-Set-KnownFolderPath.ps1
Last active October 23, 2023 02:11
powershell set shell folders! Use the SHGetFolderPath or SHGetKnownFolderPath function instead Shell Folders
<#
.SYNOPSIS
Sets a known folder's path using SHSetKnownFolderPath.
.PARAMETER Folder
The known folder whose path to set.
.PARAMETER Path
The path.
#>
# USAGE: # Set-KnownFolderPath -KnownFolder 'Desktop' -Path '\\netserver\desktop\username\desktop'
# FROM: http://stackoverflow.com/questions/25709398/set-location-of-special-folders-with-powershell
@josy1024
josy1024 / rename-leading-zeros.ps1
Created July 7, 2023 04:08
rename files to leading zeros recurse current path
# rename files recurse to leading 2 digit zeros:
# from "1 - name.mp3"
# to 01 - name.mp3
$path = Get-Location
$files = Get-ChildItem -Path $path -Filter "*.mp3" -recurse | Sort-Object
foreach ($file in $files) {
# CREDIT:
# CODE SAMPLE FROM: https://github.com/EsOsO/RRDTool
# GERMAN Get-Counter Values
# Database
$DataSource1 = New-RRDDataSource -Name cpu_kernel -DataSourceType GAUGE -Heartbeat 120 -Min 0 -Max 100
$DataSource2 = New-RRDDataSource -Name cpu_user -DataSourceType GAUGE -Heartbeat 120 -Min 0 -Max 100
$DataSource3 = New-RRDDataSource -Name cpu_queue -DataSourceType GAUGE -Heartbeat 120 -Min 0
@josy1024
josy1024 / flipflop-mouse-scrolling.ps1
Last active November 11, 2022 07:28
natural maus scrolling (flipflop mouse wheel scrolling)
# author: josef lahmer
# http://josy1024.blogspot.co.at/2013/11/touch-scrolling-for-windows-reverse.html
# natural scrolling
# natürliche scroll-richtung für die maus
#setup:
# @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/josy1024/f2cca5e49ec60ae7ed3c514bb2159051/raw/d66997f73296f7f66fc027e940d84dbcf0f86f73/flipflop-mouse-scrolling.ps1'))"
Get-ChildItem HKLM:\SYSTEM\CurrentControlSet\Enum\HID\ -recurse -ErrorAction SilentlyContinue |
Get-ItemProperty |
@josy1024
josy1024 / rdcmanprofilepasswd.ps1
Created October 25, 2019 06:30
Decrypting Remote Desktop Connection Manager Passwords from settings file with PowerShell
# author: josef lahmer
# thanks to https://smsagent.blog/2017/01/26/decrypting-remote-desktop-connection-manager-passwords-with-powershell/
# Path to RDCMan.exe
$RDCMan = "C:\Program Files (x86)\Microsoft\Remote Desktop Connection Manager\RDCMan.exe"
# Path to RDG file
# $RDGFile = "$env:USERPROFILE\Documents\RDPConnections.rdg"
$RDGFile = "$env:LOCALAPPDATA\Microsoft\Remote Desktop Connection Manager\RDCMan.settings"
@josy1024
josy1024 / azureadenv.pl
Created August 11, 2020 13:15
print all ENV variables listet ind perl (OIDC_CLAIM_upn)
#!/usr/bin/perl
#
# place in /opt/otrs/bin/cgi-bin/azureadenv.pl
# call https://otrs.example.com/otrs/azureadenv.pl
# tested in #otrs6 #centos7
# reference: https://gist.github.com/josy1024/84853e1a72f5631f697ee324b93264fe
###
### printenv -- demo CGI program which just prints its environment
###