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
#requires -PSEdition Core | |
param ( | |
[parameter(Mandatory=$true, Position=0)][String] $TwAc | |
) | |
# | |
# どこかからダウンロードしたファイルをNASに保存するスクリプト | |
# | |
$TGTPath = "~\Downloads\twitter_media_harvest\" + $TwAc | |
if( -! (Test-Path -Path $TGTPath)){ throw 'フォルダがありません' } |
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
<dict> | |
<key>NTPContentSuggestionsEnabled</key> | |
<false/> | |
<key>BrowserSignin</key> | |
<integer>0</integer> | |
<key>AutoFillEnabled</key> | |
<false/> | |
<key>PasswordManagerEnabled</key> | |
<false/> | |
<key>NewTabPageLocation</key> |
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
{ | |
"bridge": { | |
"name": "Homebridge X123", | |
"username": "01:23:45:67:89:AB", | |
"port": 65534, | |
"pin": "000-11-222" | |
}, | |
"platforms": [ | |
{ | |
"name": "Homebridge X123", |
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
PS > $jsonObj = Get-Content -path "\\DS918plus-001\home\Documents\ExposureChecks-2022-01-23.json" | ConvertFrom-Json | |
PS > $jsonObj.ExposureChecks.Files | foreach { if ($_.MatchCount -ne 0) { $_.MatchCount,$_.Timestamp -join ',' }} | |
PS > $jsonObj.ExposureChecks.Files | foreach { if ($_.MatchCount -ne 0) { $_.MatchCount,$_.Timestamp -join ',' ; $totalcount += $_.MatchCount }} ; Write-Host $totalcount |
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
param ($Arg1) | |
Write-Host "$Arg1 秒" | |
$second = $Arg1 % 60 | |
$Arg1 = ($Arg1 - $second) / 60 | |
Write-Host "$Arg1 分 $second 秒" | |
$minute = $Arg1 % 60 | |
$Arg1 = ($Arg1 - $minute) / 60 | |
Write-Host "$Arg1 時間 $minute 分 $second 秒" | |
$hour = $Arg1 % 24 | |
$Arg1 = ($Arg1 - $hour) / 24 |
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
function ffmpegencoding($filename) | |
{ | |
if (!(Test-Path ./$filename.mp4 )) | |
{ | |
. 'C:\Program Files (x86)\Streamlink\ffmpeg\ffmpeg.exe' -i .\${filename}.ts -vcodec libx264 -crf 23 -acodec aac -ab 192k .\${filename}.mp4 | |
} | |
} | |
(Get-ChildItem -Recurse -File -Include *.ts).BaseName | ForEach-Object { ffmpegencoding $_ } |
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 = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" | |
$name = "ShowSecondsInSystemClock" | |
New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value "1" |
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
( | |
echo 'digraph{' | |
echo バニラバニラバニラ求人バニラバニラ高収入バニラバニラバニラ求人バニラバニラでアルバイト | sed 's/./& /g' | sed -r 's/(.).*/&バ/'| awk '{for(i=1;i<NF;i++)print $i "->"$(i+1),";"}' | |
echo '}' | |
) | circo -Tpng > /images/a.png #シェル芸 |
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
#!/bin/bash | |
text1=$1 | |
if [ -w ${text1} ]; then | |
echo $text1 | |
text2=`file $text1 | sed -e 's/.*datetime=\(.*\)\].*/\1/g' -e "s/://g" -e "s/\s/-/g"` | |
echo ${text2}_${text1} | |
if [ -n "${text2}" ]; then | |
mv -i ${text1} ${text2}_${text1} | |
fi |
NewerOlder