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
@Ovis
Ovis / MainWindow.xaml
Created Nov 24, 2019 — forked from kekyo/MainWindow.xaml
DelegateCommand on WPF
View MainWindow.xaml
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Button x:Name="button">
TEST
@Ovis
Ovis / softether-vpnserver.service
Last active Sep 1, 2019
TAPデバイス有効化
View softether-vpnserver.service
[Unit]
Description=SoftEther VPN Server
After=network.target network-online.target
ConditionPathExists=!/usr/local/vpnserver/do_not_run
[Service]
Type=forking
TasksMax=16777216
EnvironmentFile=-/usr/local/vpnserver
ExecStart=/usr/local/vpnserver/vpnserver start
View tap-enable.sh
#!/bin/sh
TAP_DEVICE=tap_softether
BR_STATUS=`/sbin/brctl show br0 | grep ${TAP_DEVICE} | wc -l`
LOOP_CNT=0
while [ $BR_STATUS = 0 ]
do
sleep 1
/sbin/brctl addif br0 ${TAP_DEVICE}
if [ $? -ne 0 ]; then
View gist:8a11e439ae694072dc9eb523b25bfc86
# The loopback network interface
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
#サーバーのIPアドレスを決め、入力
address 192.168.0.6
netmask 255.255.255.0
gateway 192.168.0.1
View softether-vpnserver.service
[Unit]
Description=SoftEther VPN Server
After=network.target network-online.target
ConditionPathExists=!/usr/local/vpnserver/do_not_run
[Service]
Type=forking
TasksMax=16777216
EnvironmentFile=-/usr/local/vpnserver
ExecStart=/usr/local/vpnserver/vpnserver start
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);
You can’t perform that action at this time.