https://www.ghisler.ch/wiki/index.php?title=Main_Page
winget install -e --id Ghisler.TotalCommander
winget install -e --id vim.vim
winget install -e --id Ghisler.TotalCommander
winget install -e --id GnuWin32.Grep
winget install -e --id gerardog.gsudo
winget install -e --id ArtifexSoftware.GhostScript
winget install -e --id WiresharkFoundation.Wireshark
winget install -e --id Mozilla.Firefox
This file contains 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
# testfile-0000-days-ago というファイル名で古くなって行くファイルを出力 | |
0..-365 | %{$date=(Get-Date).addDays($_);New-Item -ItemType File -Name "testfile-$("{0:0000}" -f [math]::Abs($_))-days-ago" -PipelineVariable newFile | %{ $newFile.CreationTime , $newFile.LastAccessTime ,$newFile.LastWriteTime = $date,$date,$date } } | |
# testfile.yyyyMMdd というファイル名で古くなって行くファイルを出力 | |
0..-365 | %{$date=(Get-Date).addDays($_);New-Item -ItemType File -Name "testfile.$((get-date).addDays($_) | Get-Date -Format "yyyyMMdd")" -PipelineVariable newFile | %{ $newFile.CreationTime , $newFile.LastAccessTime ,$newFile.LastWriteTime = $date,$date,$date } } |
This file contains 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
# 最終更新日付(月単位)でディレクトリの中身を集計してファイルサイズと個数を出力するやつ | |
@{Path = "./"; Recurse = $true } | ForEach-Object { Get-ChildItem @_ } | Group-Object { $_.LastWriteTime.ToString('yyyy-MM') } | Select-Object @{ Name = 'LastWriteTime'; Expression = { $_.Name } } , @{Name = 'Size(MB)'; Expression = { ($_.Group | Measure-Object Length -Sum).Sum / 1MB -as [decimal] } } , @{Name = 'FileCount'; Expression = { ($_.Group | Measure-Object).Count } } | Sort-Object LastWriteTime | |
# グループ化した時のGroupを残したやつ。(詳細を調査したい用) | |
@{Path = "./"; Recurse = $true } | ForEach-Object { Get-ChildItem @_ } | Group-Object { $_.LastWriteTime.ToString('yyyy-MM') } | Select-Object @{ Name = 'LastWriteTime'; Expression = { $_.Name } } , @{Name = 'Size(MB)'; Expression = { ($_.Group | Measure-Object Length -Sum).Sum / 1MB -as [decimal] } } , @{Name = 'FileCount'; Expression = { ($_.Group | Measure-Object).Count } } , Group | Sort-Object LastWriteTime |
This file contains 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
#!/usr/bin/env pwsh | |
<# | |
.SYNOPSIS | |
Backlogの課題に添付されているファイルのダウンロード | |
.DESCRIPTION | |
config.jsonで指定したプロジェクトの課題に含まれる添付ファイルをすべてダウンロード。 | |
.EXAMPLE | |
PS> ./Save-AttachementFileFromBacklogIssues.ps1 | |
.INPUTS |
aws-cliでassume-roleするための手法は下記2パターン。 configとcredentialを設定して利用するが手間が少ない気がする。。
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sts/assume-role.html
PowerShellギャラリーに Indented.Net.IP があり。 https://www.powershellgallery.com/packages/Indented.Net.IP/6.0.1
Get-NetworkRange 192.168.0.1/24
Get-NetworkSummary 192.168.0.1/24
NewerOlder