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
# Docker /etc/docker/daemon.json | |
echo "{ | |
\"data-root\": \"/docker\", | |
\"storage-driver\": \"overlay2\", | |
\"registry-mirrors\": [\"https://art.loubit.eu\"] | |
}" > /etc/docker/daemon.json | |
# Install docker | |
curl -fsSL https://get.docker.com | sh |
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
JobName: | |
stage: Build | |
variables: | |
SCENARIO: Doing it's job properly, let it be! | |
tags: | |
- SomeTarget | |
script: | |
- pwsh -f DoShit.ps1 | |
after_script: | |
- apt update > /dev/null && apt install -y git >/dev/null |
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
#Enum UpdatesResultCode{ NotStarted; InProgress; Succeeded; SucceededWithErrors; Failed; Aborted } | |
$UpdatesResultCode = @{0 = 'NotStarted';1 = 'InProgress';2 = 'Succeeded';3 = 'SucceededWithErrors';4 = 'Failed';5 = 'Aborted'} | |
$Session = New-Object -ComObject Microsoft.Update.Session | |
$Searcher = $Session.CreateUpdateSearcher() | |
$UpdateServiceManager = New-Object -ComObject Microsoft.Update.ServiceManager | |
$Searcher.ServiceID = $UpdateServiceManager.Services | ? Name -eq 'Windows Update' | Select-Object -ExpandProperty ServiceID | |
Write-Verbose -Verbose -Message 'Collecting data about missing updates from "Windows Update" service' | |
$Result = $Searcher.Search('IsAssigned=1 and IsHidden=0 and IsInstalled=0') |
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
# boot PC with windows PE and open console | |
bootrec /rebuildbcd | |
--> Total identified Windows installations: 0 | |
--> Access Denied | |
--> Any other error you may see | |
diskpart | |
select disk 0 # disk with OS | |
list vol | |
select vol 3 # volume with efi boot loader should be 99MB volume or the one labeled efi |
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 Get-DecodedString { | |
[CmdLetBinding()] | |
Param ( | |
[Parameter(Position = 0)] | |
$Bytes | |
) | |
Process { $allBytes += [byte[]]$($Bytes) } | |
End { | |
Try{ |
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
Zaklad: | |
Ingredience: | |
- 3 vejce + 50-70g trtinoveho cukru a uslehat | |
- 180g polohrube mouky | |
- 1/2 prasku do peciva | |
- 5g jedle sody (nemusi ale lip to naskakuje) | |
- 100g masla <<<<<------- ;) mozna 50/50 nebo 25/75 ;) | |
- 110g mleka | |
- 1 lzicka kakaa - podle barevne potreby ja ji vynechavam pro cheesecake ale do muffinu se hodi | |
HowTo: | |
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
parted /dev/sdb # if you restarted server or line below first to rescan iSCSI first | |
echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan # rescan devices after vmware disk resize | |
parted /dev/sdb # go for parted now! | |
- print # to check | |
- resizepart # Command to do resize | |
- 1 # Partition number | |
- Yes # for question if we want to check | |
- 100% # resize to max value | |
- print # check if magicx was done | |
- quit # be done with it |
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
iptables -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER | |
iptables -t nat -A PREROUTING -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER |
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 Connect-Zabbix { | |
[CmdLetBinding()] | |
Param | |
( | |
[Parameter(Mandatory, Position = 0)] | |
[String]$Uri, | |
[Parameter(Mandatory, Position = 1)] | |
[String]$Token |
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
$Rows = Import-Csv -Path .\NewVMs.csv | |
#$Rows = @( [PsCustomObject]@{VMName = 'Training01'; Owner = 'It Infra'} ) | |
$ErrorActionPreference = 'stop' | |
Import-Module -Name Az.Accounts, Az.Compute, Az.Network, Az.Resources | |
Connect-AzAccount -SubscriptionId 3a223927-ac2f-49a8-a134-0f4759d2e5cb | |
# Azure VM specs | |
$RG = @{ | |
Location = "southeastasia" |