Skip to content

Instantly share code, notes, and snippets.

$client = new-object System.Net.WebClient
New-Item -Path C:\Temp -ItemType directory
#Visual C++ 2005 SP1 再頒布可能ライブラリ
$client.DownloadFile("http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.exe","C:\Temp\vcredist_x64_2005_1.exe")
C:\Temp\vcredist_x64_2005_1.exe /q
$client.DownloadFile("http://download.microsoft.com/download/0/d/8/0d8a1fc4-50f5-4017-879b-e1f5b55bae36/vcredist_x86.exe","C:\Temp\vcredist_x86_2005.exe")
C:\Temp\vcredist_x86_2005.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
$client.DownloadFile("http://download.microsoft.com/download/1/8/e/18ea5601-3cd3-4597-b38a-c8c38f3390f4/vcredist_x64.exe","C:\Temp\vcredist_x64_2005.exe")
C:\Temp\vcredist_x64_2005.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
@Ovis
Ovis / tuners.yml
Created November 15, 2017 15:49
tuners.yml
- name: PT3-S1
types:
- BS
- CS
command: C:\TV\BonRecTest\x64\BonRecTest.exe --space <satelite> --decoder C:\TV\BonRecTest\x64\B25Decoder.dll --driver C:\TV\BonRecTest\x64\BonDriver_PT3-S0.dll --output - --channel <channel>
decoder: ~
isDisabled: false
- name: PT3-S2
types:
//パイプコマンドにはチャンネル変更の完了を調べる仕組みがないので、妥当な時間だけ待つ
else if( GetTickCount() - this->tunerChChgTick > 5000 && r.startTime - r.startMargin < now ){
//録画開始~
if( RecStart(r, now) ){
//途中から開始されたか
@Ovis
Ovis / channels.yml
Last active December 6, 2018 08:48
channels.yml
- name: NHK教育テレビ
type: GR
channel: '0'
- name: CBCテレビ
type: GR
channel: '5'
- name: 中京テレビ
type: GR
channel: '6'
- name: NHK総合
- name: PX-W3PE4-T1
types:
- GR
command: D:\TV\BonRecTest\x64\BonRecTest.exe --decoder D:\TV\BonRecTest\x64\B25Decoder.dll --driver D:\TV\BonRecTest\x64\BonDriver_PX_W3PE4_T0.dll --output - --channel <channel>
decoder: ~
isDisabled: false
- name: PX-W3PE4-T2
types:
- GR
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
@Ovis
Ovis / gist:fe76308522e4649fd6cb50b0bc4dddbf
Created January 28, 2019 09:12
Linux上でTimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time")を用いた場合のエラーメッセージ
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)
(後略)
@Ovis
Ovis / GetLocalTime.cs
Created January 28, 2019 09:14
日本標準時取得(Windows、C#)
var jst = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");
var localTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, jst);
@Ovis
Ovis / gist:acb014b4536fe60978b000906b0d0ee5
Created January 28, 2019 09:16
Linux上のタイムゾーン
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_LinuxOK.cs
Created January 28, 2019 09:23
日本標準時をLinuxでも取得
var jst = TZConvert.GetTimeZoneInfo("Tokyo Standard Time");
var localTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, jst);