This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Sync-Folders | |
.DESCRIPTION | |
sync settings folders to onedrive settings folders | |
.EXAMPLE | |
PS C:\> SYNC-Folders.ps1 | |
.INPUTS | |
$source = "sourcefolder" | |
$Destination = "Onedrive-Destination-Folder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ 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"]) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: start->run | |
shell:startup | |
shell:common startup | |
:: "C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" | |
:: "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# author: josef lahmer (https://about.me/josy1024) | |
# source: https://gist.github.com/josy1024/dae6bfe4db7e3a7ac361bd3037efaab0 | |
# helper script for otrs update: http://doc.otrs.com/doc/manual/admin/5.0/en/html/upgrading.html | |
# otrs 6: https://doc.otrs.com/doc/manual/admin/6.0/en/html/updating.html | |
# Backup everything below /opt/otrs/ | |
# tested on centos x64, otrs 4-5 update | |
# copy and paste! | |
# internal puppet hashtag: #otrsupdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
httphost=10.0.0.138 | |
#http status code | |
var=`/usr/bin/curl -I http://$httphost --connect-timeout 5 2>/dev/null | /usr/bin/head -n 1 | /bin/awk -F" " '{print $2}'` | |
if [ "$var" = "200" ] ; then | |
echo "allfine ;-)" | |
else | |
echo repairscript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BlockSizeBytes 1MB!! | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/a4194749-6c3e-4700-ab13-b6c43aaaceb3/vhdx-file-size-after-formatting?forum=linuxintegrationservices | |
PS> | |
New-VHD -Path vm701_appdisk.vhdx -SizeBytes 64GB -Dynamic -BlockSizeBytes 1MB | |
#xfs: | |
# create filesystem with high number of allocation groups (dynamic vh's don't grow that fast!) | |
mkfs.xfs -d agcount=4096 /dev/sdb | |
# > (ALLOCATES 4GB ON VHDX DATA AFTER mkfs) |