Skip to content

Instantly share code, notes, and snippets.

Avatar

josef lahmer josy1024

View GitHub Profile
@josy1024
josy1024 / otrs-menu-search-config.pm
Last active Aug 17, 2020
OTRS Menu: Waitto, Bing, Azure Devops Tickets Features
View otrs-menu-search-config.pm
$Self->{'Frontend::Navigation'}->{'AgentTicketSearch'}->{'003-Warten'} = [
{
'AccessKey' => '',
'Block' => '',
'Description' => 'Tickets mit Wecker status',
'Group' => [],
'GroupRo' => [],
'Link' => 'Action=AgentTicketSearch',
'LinkOption' => 'onclick="top.location.href=\'https://otrs.example.com/otrs/index.pl?Action=AgentTicketSearch&Subaction=Search&EmptySearch=1&ResultForm=Normal&StateIDs=10\'"; returen false;',
@josy1024
josy1024 / azureadenv.pl
Created Aug 11, 2020
print all ENV variables listet ind perl (OIDC_CLAIM_upn)
View azureadenv.pl
#!/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
###
@josy1024
josy1024 / AzureADAuth.pm
Last active Jan 15, 2021
use Apache Auth (mod_auth_openidc) for Otrs Agent Login
View AzureADAuth.pm
# --
# Copyright (C) 2001-2020 OTRS AG, https://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
# --
# $Self->{'AuthModule'} = 'Kernel::System::Auth::AzureADAuth';
# SOURCE: copy from HTTPBasicAuth.pm from OTRS6
# Place FILE IN: /opt/otrs/Kernel/System/Auth
@josy1024
josy1024 / envvars.ps1
Created Jun 1, 2020
list all env enviroment variables
View envvars.ps1
#list all env enviroment variables
get-childitem env:
$env:USERPROFILE
@josy1024
josy1024 / SYNC-Folders.ps1
Last active Jun 1, 2020
Sync - TOOL Library settings - Folders for Carbide Create
View SYNC-Folders.ps1
<#
.SYNOPSIS
Sync-Folders
.DESCRIPTION
sync settings folders to onedrive settings folders
.EXAMPLE
PS C:\> SYNC-Folders.ps1
.INPUTS
$source = "sourcefolder"
$Destination = "Onedrive-Destination-Folder"
@josy1024
josy1024 / rdcmanprofilepasswd.ps1
Created Oct 25, 2019
Decrypting Remote Desktop Connection Manager Passwords from settings file with PowerShell
View rdcmanprofilepasswd.ps1
# 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 / deployinator.ps1
Last active Jan 21, 2019
deployinator for powershell
View deployinator.ps1
# inspired deployinator for powershell
# http://blog.johngoulah.com/tag/deployinator/
# author: josy1024@gmail.com
Function Get-Code ([String]$REPODIR, [String]$REPO)
{
# controller deployinator
$host.ui.RawUI.WindowTitle = "git $REPO"
Write-Host git pull -ForegroundColor green
@josy1024
josy1024 / cli_setup_spfx_dev.cmd
Last active Feb 17, 2021
windows setup sharepoint spfx
View cli_setup_spfx_dev.cmd
:: https://docs.microsoft.com/de-de/sharepoint/dev/spfx/set-up-your-development-environment
:: https://docs.microsoft.com/de-de/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part
:: requirements: chocolatey installed (windows)
:: SETUP ENVIRONMENT (ADMIN) #spfx
choco install nodejs-lts --version 8.11.4
refreshenv
@josy1024
josy1024 / redirect.aspx
Last active May 18, 2018
redirect to otherurl aspx
View redirect.aspx
<%@ Page Language="C#" %>
<script runat="server">
protected override void OnLoad(EventArgs e)
{
Response.Redirect("/pathnew/otherurl.aspx");
//maybe useful as default.aspx for folder redirections
// variant and redirect with "q" parameter
// Response.Redirect("/pathnew/otherurl.aspx?q=" + Server.HtmlEncode(Request.QueryString["q"]) );
}
@josy1024
josy1024 / shell.startup.quicklinks.cmd
Created Nov 3, 2017
die autostart autorun startup ordner
View shell.startup.quicklinks.cmd