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
| import React from 'react'; | |
| export const useDebounced = <T extends unknown>(value: T, debounceDelay: number) => { | |
| const [debouncedValue, setDebouncedValue] = React.useState(value); | |
| React.useEffect(() => { | |
| const timeout = setTimeout(() => setDebouncedValue(value), debounceDelay); | |
| return () => clearTimeout(timeout); | |
| }, [value, debounceDelay]); |
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
| az group create --name testVm | |
| az vm create ` | |
| --resource-group testVm ` | |
| --name test ` | |
| --image Canonical:UbuntuServer:18.04-LTS:latest ` | |
| --admin-username azureuser ` | |
| --generate-ssh-keys |
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
| cd G: | |
| Get-WindowsImage -ImagePath ".\sources\install.wim" |
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
| ansible-playbook --extra-vars "ansible_user=user ansible_password=password ansible_sudo_pass=password " playbook.yaml |
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
| Param( | |
| [Parameter(Mandatory=$true)] | |
| [string] $VmName | |
| ) | |
| $VmBasePath = "$PSScriptRoot\$VmName" | |
| $VmFullPath = Get-Childitem -Path $VmBasePath -Recurse -Include *.vmcx | |
| Write-Host "VM Path: $VmFullPath" | |
| Import-VM -Path $VmFullPath |
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
| #cloud-config | |
| groups: | |
| - docker | |
| users: | |
| - default | |
| # the docker service account | |
| - name: docker-service | |
| groups: docker | |
| package_upgrade: true | |
| packages: |