Last active
December 21, 2025 02:31
-
-
Save victorgabrielbs/25ca50637c39e2d0f925472564c34bd2 to your computer and use it in GitHub Desktop.
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
| oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/bubblesextra.omp.json" | Invoke-Expression | |
| $modules = @( | |
| "PSScriptTools", | |
| "Terminal-Icons", | |
| "PSReadLine", | |
| "PSFzf", | |
| "Microsoft.WinGet.CommandNotFound" | |
| ) | |
| foreach ($m in $modules) { Import-Module $m -ErrorAction SilentlyContinue } | |
| Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | |
| Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' | |
| Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion } | |
| Set-PSReadLineOption -PredictionSource History | |
| Set-PSReadLineOption -PredictionViewStyle ListView | |
| Set-PsFzfOption -EnableAliasFuzzyKillProcess | |
| #f45873b3-b655-43a6-b217-97c00aa0db58 PowerToys CommandNotFound module | |
| function get-up { | |
| Get-WindowsUpdate -MicrosoftUpdate | |
| } | |
| function update { | |
| Install-WindowsUpdate -AcceptAll | |
| } | |
| function time($command) { | |
| Measure-Command { $command } | |
| } | |
| function Get-MyIP { | |
| # IP local da interface física ativa | |
| $local = Get-NetAdapter ` | |
| | Where-Object { $_.Status -eq "Up" -and $_.HardwareInterface -eq $true } ` | |
| | ForEach-Object { | |
| Get-NetIPAddress -InterfaceIndex $_.IfIndex -AddressFamily IPv4 | | |
| Select-Object -ExpandProperty IPAddress | |
| } | |
| # IP público | |
| $publico = Invoke-RestMethod "https://api.ipify.org" | |
| Write-Host "IP local: $local" | |
| Write-Host "IP público: $publico" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment