Skip to content

Instantly share code, notes, and snippets.

View SD-ITLab's full-sized avatar

SD-ITLab SD-ITLab

View GitHub Profile
@SD-ITLab
SD-ITLab / dockersetup.sh
Last active April 15, 2024 13:39
Docker-Installation script
#!/bin/bash
# Function for printing colored section headings
print_colored_section_header() {
echo
echo -e "\e[1;34m#############################################\e[0m"
echo
echo -e "\e[1;34m $1\e[0m"
echo
echo -e "\e[1;34m#############################################\e[0m"
@SD-ITLab
SD-ITLab / securesystemsetup.sh
Last active March 6, 2024 08:31
Script for Secure your Linux-System
#!/bin/bash
# Function for executing commands with optional sudo
run_command() {
if [ -x "$(command -v sudo)" ]; then
sudo "$@"
else
"$@"
fi
}
@SD-ITLab
SD-ITLab / Powershell in Bat
Created March 26, 2023 16:41
This little code, starting a Powershell script in a .Bat file as Admin
<# : batch script
@echo off
cd /D "%~dp0"
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
setlocal
cd %~dp0
powershell -executionpolicy remotesigned -Command "Invoke-Expression $([System.IO.File]::ReadAllText('%~f0'))"
endlocal
goto:eof
#>
$ProgressPreference = 'SilentlyContinue'
$host.ui.RawUI.WindowTitle = "Windows - Reparatur-Tool"
[Console]::WindowWidth=101;
[Console]::Windowheight=30;
[Console]::setBufferSize(101,30) #width,height
$Display = {
Write-Host " __ __.__ __________
/ \ / \__| ____\______ \ ____ ______
\ \/\/ / |/ \| _// __ \\____ \
$ProgressPreference = 'SilentlyContinue'
$host.ui.RawUI.WindowTitle = "Windows Package Manager - Installer"
[Console]::WindowWidth=103;
[Console]::Windowheight=30;
[Console]::setBufferSize(103,30) #width,height
$End = {
Write-Host " ║ ║" -ForegroundColor Yellow
Write-Host " ╠═══════════════════════════════════════════════════════════════════════════════════════════════╣" -ForegroundColor Yellow
Write-Host " ║ " -ForegroundColor Yellow -NoNewline
@SD-ITLab
SD-ITLab / Unattended Software Installation.ps1
Last active July 14, 2023 07:42
Unattended Software Installation without Internet connection.
$host.ui.RawUI.WindowTitle = "Unattended Software Deployment"
[Console]::WindowWidth=102;
[Console]::Windowheight=30;
[Console]::setBufferSize(102,30) #width,height
$Display = {
Write-Host " ____ ___ __ __ .___ .___
| | \____ _____ _/ |__/ |_ ____ ____ __| _/____ __| _/
| | / \\__ \\ __\ __\/ __ \ / \ / __ |/ __ \ / __ |
| | / | \/ __ \| | | | \ ___/| | \/ /_/ \ ___// /_/ |
|______/|___| (____ /__| |__| \___ >___| /\____ |\___ >____ |