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
$r = @{ | |
Pattern = '(some)?text'; | |
Replacement = 'some other text'; | |
StartLine = 3553; | |
EndLine = 6236; | |
File = '\file.txt' | |
RgArgs = @( | |
'--case-sensitive', | |
'--encoding=windows-1252', | |
'--crlf', |
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
$repoName = "PowerShell/PowerShell" | |
$assetPattern = "*-win-x64.msi" | |
$extractDirectory = "C:\Users\Public\Downloads" | |
$releasesUri = "https://api.github.com/repos/$repoName/releases/latest" | |
$asset = (Invoke-WebRequest $releasesUri | ConvertFrom-Json).assets | Where-Object name -like $assetPattern | |
$downloadUri = $asset.browser_download_url | |
$extractPath = [System.IO.Path]::Combine($extractDirectory, $asset.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
$releasesUri = 'https://api.github.com/repos/mattia72/DRipGrepper/releases' | |
(Invoke-WebRequest $releasesUri | ConvertFrom-Json).assets | Where-Object name -like DRipExtension* | Select-Object 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
Get-ChildItem *.svg |%{&magick.exe -background none $_.FullName "$($_.BaseName).bmp"; Write-Host $_.BaseName} |
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
scoop list | %{scoop info $_.Name} | Select-Object -Property Name, Website, Description | Export-Csv -Path .\Desktop\scoopp.csv |
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..10) | %{ | |
Start-Sleep -Milliseconds 200; | |
Write-Host "`r" "$("{1} {0,-300}" -f ('\','|','/','-')[$i++%4], "$_")".Trim() -NoNewline | |
}; | |
Write-Host "`rReady" |
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
$a = $(Get-Content .\schema2.json) -split ',' | |
$b = $(Get-Content .\schema.json) -split ',' | |
Compare-Object -ReferenceObject $a -DifferenceObject $b |
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
Error E107 raises, if -post function is defined like this | |
``` | |
command! -bang -bar -nargs=? -complete=file_in_path DelphiMake | |
\ call delphi#SetDefaultShell() | |
\| execute 'AsyncRun'.<bang>.' -post='.fnameescape('call delphi#PostBuildSteps()').' -auto=make -program=make @ /p:config='.g:delphi_build_config.' '.delphi#FindProject(<f-args>)) | |
\| call delphi#RestoreOrigShell() | |
``` | |
Error disapears if function call has g: prefix and between () has a space | |
``` | |
execute 'AsyncRun'.<bang>.' -post='.fnameescape('call g:delphi#PostBuildSteps( )').' -auto=make -program=make @ /p:config='.g:delphi_build_config.' '.delphi#FindProject(<f-args>)) |
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
vim.g.dashboard_custom_header = { | |
' ▒ ', | |
' ░▓▓▓ ▓▓▓ ', | |
' ▒▓▓▓▓▓▓▒ ░▓▓▓▓ ', | |
' ▒▓▓▓▓▓▓░░░░ ▓▓▓▓▓▓▒ ▓▓▓▓ ', | |
'▓▓▓▒▓▓▓▓▒▒▒▒▒ ▓▓▓▓▓▓▓▓ ', | |
'▓▓▓▓▓▒▓▓▓▓▓▓▓▓▒ ░▓▓▓▓▓▓▓ ▒ ▓▓▒▒ ▒▒▓▒ ▒▓▓▒▒ ▓▓▓▓ ▒▓▓▓ ▓▓▓▓ ▓▓▓ ░▓▓▓▓▒ ░▓▓▓▓▓▓ ', | |
'▓░░░░░▒▓▓▓▓▓▓▓▓▓ ░▓▓▓▓▓▓▓ ▓▓▓░ ▓▒ ▓▓ ░▓ ░▓▓ ░▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▒', | |
'▓▒▒▒▒▒▒▒░░░░░░░░▓ ░▓▓▓▓▓▓▓ ▓▓ ▓░ ▓░ ▓░ ▓▓ ▓▓ ▓▓▓▓ ▓▓▓░ ▓▓▓▓ ▓▓▓▓ ░▓▓▓▒ ▒▓ |
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
SX. ;8. | |
. . . :S8@.: . . . . . . . %8 S. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | |
. :S8@@@@ % . . %888%@ . . . . . . . . . . . . . . . . | |
.t 8@@8@@8%; . . . . %88:888:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | |
. :@88@8X8@@88%@. . .%8:@X;8 %. . . . . . . . . . . . ::::::. . . . | |
.8X8@8@88@8@8@@%8 |
NewerOlder