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
| # 1. Garantir que o script tenha privilégios e esperar a rede (opcional) | |
| Start-Sleep -Seconds 10 | |
| # 2. Registrar o Winget (App Installer) para o usuário atual | |
| # Às vezes, em instalações limpas, o comando 'winget' demora a ser reconhecido no PATH | |
| $AppInstaller = Get-AppxPackage -Name "Microsoft.DesktopAppInstaller" | |
| if ($null -eq $AppInstaller) { | |
| # Se não existir, o Windows 10/11 geralmente o possui mas precisa de ativação | |
| Add-AppxPackage -Register "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller*\AppxManifest.xml" -DisableDevelopmentMode | |
| } |
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 | |
| REM Instalar o Chocolatey | |
| echo Instalando o Chocolatey... | |
| SET CHOCO_INSTALL_SCRIPT=https://community.chocolatey.org/install.ps1 | |
| powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; Invoke-WebRequest '%CHOCO_INSTALL_SCRIPT%' -OutFile 'install.ps1'; & '.\install.ps1'" | |
| REM Esperar até que o Chocolatey seja instalado | |
| echo Aguardando a instalação do Chocolatey... | |
| timeout /t 10 |
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
| <# | |
| .SYNOPSIS | |
| Script de preparação para Sysprep no Windows 11. | |
| Resolve erros de Appx (Copilot), Reserved Storage e pacotes pendentes. | |
| #> | |
| # 1. Verificar privilégios de Administrador | |
| if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
| Write-Error "Por favor, execute este script como Administrador." | |
| exit |
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 | |
| REM Instalar o Chocolatey | |
| echo Instalando o Chocolatey... | |
| SET CHOCO_INSTALL_SCRIPT=https://community.chocolatey.org/install.ps1 | |
| powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; Invoke-WebRequest '%CHOCO_INSTALL_SCRIPT%' -OutFile 'install.ps1'; & '.\install.ps1'" | |
| REM Esperar até que o Chocolatey seja instalado | |
| echo Aguardando a instalação do Chocolatey... | |
| timeout /t 10 |
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 sl4a | |
| import time | |
| droid = sl4a.Android() | |
| def speak(text): | |
| droid.ttsSpeak(text) | |
| while droid.ttsIsSpeaking()[1] == True: | |
| time.sleep(1) | |
| def listen(): |
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
| rsync -rvt --delete -e "ssh -p 5252" --log-file=/var/log/backupdiario.log 192.168.1.1:/home /mnt/dados && echo 0 > /var/log/backupstatus || echo 1 > /var/log/backupstatus |