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 | |
# extract average CPU usage of all cores | |
idle_time=$(mpstat 1 1 | awk '/Average:/ {print $NF}' | sed 's/\,/./' ) | |
cpu_usage=$(echo "(100 - $idle_time)" | bc -l ) | |
echo $cpu_usage | |
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
services: | |
companion: | |
container_name: companion | |
image: ghcr.io/bitfocus/companion/companion:latest | |
ports: | |
- "8000:8000" | |
- "16622:16622" | |
- "28492:28492" | |
volumes: | |
- /dev/bus/usb:/dev/bus/usb |
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 | |
shopt -s nullglob | |
pp (){ | |
if [ -x "$(command -v cowsay)" ] | |
then | |
cowsay "$1" | |
else | |
echo "==========" | |
echo "$1" |
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
@echo off | |
set TIMEOUT_SECONDS=%1 | |
for /f "tokens=4 skip=1" %%f in ('powercfg -list ^| findstr \*') do set GUID=%%f | |
SET SUB_SLEEP=238c9fa8-0aad-41ed-83f4-97be242c8f20 | |
SET STANDBYIDLE=29f6c1db-86da-48c5-9fdb-f2b67b1f44da | |
powercfg -setacvalueindex %GUID% %SUB_SLEEP% %STANDBYIDLE% %TIMEOUT_SECONDS% |
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
#!/usr/bin/env python | |
import argparse | |
# validates user input | |
def parser_validate(value, min = 1, max = 65535): | |
(container, host) = value.split('=') if '=' in value else (value, value) | |
(containeruid, containergid) = container.split(':') if ':' in container else (container, container) | |
(hostuid, hostgid) = host.split(':') if ':' in host else (host, host) |
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
Windows Registry Editor Version 5.00 | |
; Bogus MDM Enrollment - Key 1 of 2 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF] | |
"EnrollmentState"=dword:00000001 | |
"EnrollmentType"=dword:00000000 | |
"IsFederated"=dword:00000000 | |
; Bogus MDM-Enrollment - Key 2 of 2 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\OMADM\Accounts\FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF] | |
"Flags"=dword:00d6fb7f | |
"AcctUId"="0x000000000000000000000000000000000000000000000000000000000000000000000000" |
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
$minimumCertAgeDays = 30 | |
$timeoutMilliseconds = 6000 | |
$urls = @( | |
"https://allthingsagile.co/", | |
"https://www.google.com/" | |
) | |
# disabling the cert validation check. This is what makes this whole thing work with invalid certs... | |
[Net.ServicePointManager]::ServerCertificateValidationCallback = { $true } |
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
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service |
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
#Certificate has to be installed in Personal | |
#Subject is who it has been issued to | |
$certSubject = "" | |
$tp = (ls Cert:\LocalMachine\my | WHERE {$_.Subject -match $certSubject } | Select -First 1).Thumbprint | |
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="$tp" |
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 | |
GenCertSigningReq.ps1 | |
.DESCRIPTION | |
This powershell script can be used to generate a Certificate Signing Request (CSR) using the SHA256 signature algorithm and a 2048 bit key size (RSA). Subject Alternative Names are supported. | |
.PARAMETER |
NewerOlder