Skip to content

Instantly share code, notes, and snippets.

Ovis Ovis

Block or report user

Report or block Ovis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DogaRadiTaskSchedule抜粋.xml
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2019-02-05T13:11:41.883+09:00</Date>
<Description>Title=林原めぐみのTokyo Boogie Night,Service=radiko,StationId=CRK,StationName=ラジオ関西,Starttime=20190209230000,Endtime=20190209233000,StartMargin=15,TimeFree,GetTitle,CopyPath=C:\Users\Ovis\Radio,CopyFormat=.mp3</Description>
<URI>\DogaRadi\RadioRecorder\radiko_CRK_林原めぐみのTokyoBoogieNight_201902092300_201902092330</URI>
</RegistrationInfo>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-〇〇〇〇〇〇〇〇〇〇〇〇〇〇</UserId>
View DoGaRadiImport.ps1
$XmlinPath = "D:\TaskScheduler\Task\DogaRadi\WakeUp\"
$TaskinPath = "\DogaRadi\WakeUp\"
$tasks = Get-ChildItem "$XmlinPath\*.xml" -name
foreach ($i in $tasks)
{
schtasks /create /XML $XmlinPath$i /TN "$TaskinPath$i".Replace(".xml","")
}
@Ovis
Ovis / DogaRadiTaskExport.ps1
Created Jun 30, 2019
どがらじの録音予約エクスポート
View DogaRadiTaskExport.ps1
$taskBasePath = "\DogaRadi\*"
$taskSaveDir = "D:\TaskScheduler\Task"
Get-ScheduledTask -TaskPath $taskBasePath | foreach {
$taskDir = Join-Path $taskSaveDir $_.TaskPath
if( -not (Test-Path -Path $taskDir)) {
mkdir -Path $taskDir
}
$path = (Join-Path $taskDir "$($_.TaskName).xml")
Export-ScheduledTask -TaskName $_.TaskName -TaskPath $_.TaskPath | Out-File $path # -WhatIf
@Ovis
Ovis / .NET Core Publish
Last active Jan 28, 2019
.NET Core Publish
View .NET Core Publish
PS D:\Documents\GitHub\PostDietProgress\PostDietProgress> dotnet publish --configuration Release
.NET Core 向け Microsoft (R) Build Engine バージョン 15.9.20+g88f5fadfbe
Copyright (C) Microsoft Corporation.All rights reserved.
D:\Documents\GitHub\PostDietProgress\PostDietProgress\PostDietProgress.csproj のパッケージを復元しています...
MSBuild ファイル D:\Documents\GitHub\PostDietProgress\PostDietProgress\obj\PostDietProgress.csproj.nuget.g.props を生成しています。
MSBuild ファイル D:\Documents\GitHub\PostDietProgress\PostDietProgress\obj\PostDietProgress.csproj.nuget.g.targets を生成しています。
D:\Documents\GitHub\PostDietProgress\PostDietProgress\PostDietProgress.csproj の復元が 782.4 ms で完了しました。
PostDietProgress -> D:\Documents\GitHub\PostDietProgress\PostDietProgress\bin\Release\netcoreapp2.2\PostDietProgress.dll
PostDietProgress -> D:\Documents\GitHub\PostDietProgress\PostDietProgress\bin\Release\netcoreapp2.2\publish\
@Ovis
Ovis / GetLocalTime_LinuxOK.cs
Created Jan 28, 2019
日本標準時をLinuxでも取得
View GetLocalTime_LinuxOK.cs
var jst = TZConvert.GetTimeZoneInfo("Tokyo Standard Time");
var localTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, jst);
View gist:acb014b4536fe60978b000906b0d0ee5
gceuser@free-instance:~/PostDietProgress$ dir /usr/share/zoneinfo
Africa Asia CET Cuba Egypt Factory GMT+0 HST Iran Kwajalein MST7MDT Navajo Poland Singapore US WET localtime zone.tab
America Atlantic CST6CDT EET Eire GB GMT-0 Hongkong Israel Libya Mexico PRC Portugal SystemV UTC Zulu posix zone1970.tab
Antarctica Australia Canada EST Etc GB-Eire GMT0 Iceland Jamaica MET NZ PST8PDT ROC Turkey Universal iso3166.tab posixrules
Arctic Brazil Chile EST5EDT Europe GMT Greenwich Indian Japan MST NZ-CHAT Pacific ROK UCT W-SU leap-seconds.list right
@Ovis
Ovis / GetLocalTime.cs
Created Jan 28, 2019
日本標準時取得(Windows、C#)
View GetLocalTime.cs
var jst = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");
var localTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, jst);
@Ovis
Ovis / gist:fe76308522e4649fd6cb50b0bc4dddbf
Created Jan 28, 2019
Linux上でTimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time")を用いた場合のエラーメッセージ
View gist:fe76308522e4649fd6cb50b0bc4dddbf
Unhandled Exception: System.AggregateException: One or more errors occurred. (The time zone ID 'Tokyo Standard Time' was not found on the local computer.) ---> System.TimeZoneNotFoundException: The time zone ID 'Tokyo Standard Time' was not found on the local computer. ---> System.IO.FileNotFoundException: Could not find file '/usr/share/zoneinfo/Tokyo Standard Time'.
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Internal.IO.File.ReadAllBytes(String path)
at System.TimeZoneInfo.TryGetTimeZoneFromLocalMachine(String id, TimeZoneInfo& value, Exception& e)
--- End of inner exception stack trace ---
at System.TimeZoneInfo.FindSystemTimeZoneById(String id)
(後略)
View Ubuntu18.04_.NETCore2.2_Install.log
gceuser@free-instance:~$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
gceuser@free-instance:~$ sudo dpkg -i packages-microsoft-prod.deb
Selecting previously unselected package packages-microsoft-prod.
(Reading database ... 60730 files and directories currently installed.)
Preparing to unpack packages-microsoft-prod.deb ...
Unpacking packages-microsoft-prod (1.0-ubuntu18.04.2) ...
Setting up packages-microsoft-prod (1.0-ubuntu18.04.2) ...
gceuser@free-instance:~$ sudo add-apt-repository universe
'universe' distribution component is already enabled for all sources.
gceuser@free-instance:~$ sudo apt-get install apt-transport-https
View BonDriver_Mirakurun_S(BonDriver_Mirakurun).ChSet4.txt
BS:000 BS朝日1 BS Digital 1 0 4 16400 151 1 0 1 0
BS:000 BS朝日2 BS Digital 1 0 4 16400 152 1 0 1 0
BS:000 BS朝日3 BS Digital 1 0 4 16400 153 1 0 1 0
BS:000 BS朝日データ753 BS Digital 1 0 4 16400 753 192 0 0 0
BS:000 BS朝日データ755 BS Digital 1 0 4 16400 755 192 0 0 0
BS:000 BS朝日データ756 BS Digital 1 0 4 16400 756 192 0 0 0
BS:000 BS朝日データ757 BS Digital 1 0 4 16400 757 192 0 0 0
BS:001 BS-TBS BS Digital 1 1 4 16401 161 1 0 1 0
BS:001 BS-TBS BS Digital 1 1 4 16401 162 1 0 1 0
BS:001 BS-TBS BS Digital 1 1 4 16401 163 1 0 1 0
You can’t perform that action at this time.