https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
This file contains hidden or 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 bash | |
| # Checks if there's a frame open | |
| emacsclient -n -e "(if (> (length (frame-list)) 1) 't)" 2> /dev/null | grep t &> /dev/null | |
| if [ "$?" -eq "1" ]; then | |
| emacsclient -a '' -nqc "$@" &> /dev/null | |
| else | |
| emacsclient -nq "$@" &> /dev/null | |
| fi |
This file contains hidden or 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 | |
| cls | |
| echo Backup starten? ([y]/n) | |
| set INPUT= | |
| set /P INPUT=Type input: %=% | |
| If /I "%INPUT%"=="n" goto end | |
| Robocopy A:\ B:\ /MIR /w:5 /r:5 /Z /V /NFL /NDL /XD "$RECYCLE.BIN" "System Volume Information" |
This file contains hidden or 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
| $updates = Start-WUScan | |
| if ($updates.Count -gt 0) { | |
| $null = Install-WuUpdates -Updates $updates | |
| if (Get-WuIsPendingReboot) { | |
| Write-Host "Updates applied. Rebooting system." | |
| Restart-Computer | |
| } | |
| } |
sudo -i
apt -qqy update && apt install -y --auto-remove libsm6 libxext6 libnotify-bin libcurl3 && apt -qqy clean
cd /opt
wget -q https://boinc.berkeley.edu/dl/boinc_7.4.22_x86_64-pc-linux-gnu.sh -O boinc.sh
chmod ugo+x boinc.sh && ./boinc.sh # Will print 'use /opt/BOINC/run_manager to start BOINC'
cd BOINC
This file contains hidden or 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
| function Test-AzDOPipeline { | |
| <# | |
| .SYNOPSIS | |
| Tests an Azure Devops Pipeline YAML configuration | |
| .DESCRIPTION | |
| This can be used to validate an Azure Devops pipeline configuration within a particular pipeline project. | |
| #> | |
| param ( | |
| #Your Azure Devops Organization Name |
This file contains hidden or 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
| $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secString) | |
| $ClearTextPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) |
This file contains hidden or 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
| $esx = Get-VMHost *esx01* | |
| $ds = Get-Datastore -VMHost $esx | |
| $lun = Get-ScsiLun -VmHost $esx | |
| $hostStorageSystem = Get-View $esx.Extensiondata.ConfigManager.StorageSystem | |
| foreach ($uuid in $ds.ExtensionData.info.Vmfs.uuid) | |
| { | |
| Write-Host -ForegroundColor Magenta "Unmounting Volume $uuid" | |
| $hostSTorageSystem.UnmountVmfsVolume($uuid) |