Skip to content

Instantly share code, notes, and snippets.

@telfaria
telfaria / MagicOnion.Client.Connection.cs
Created October 15, 2023 10:20
MagicOnion Client Connection
private GrpcChannel channel;
private IMagicOnionAppService client;
private async void connect()
{
channel = GrpcChannel.ForAddress("http://localhost:5000");
client = MagicOnionClient.Create<IMagicOnionAppService>(channel);
txtResult.AppendText("Connect: http://localhost:5000 \r\n");
@telfaria
telfaria / MagicOnion.Server.Program.cs
Last active October 15, 2023 10:13
MagicOnion Server Startup
using MagicOnion;
using MagicOnion.Server;
using MagicOnionApp.Shared;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.DependencyInjection;
namespace MagicOnionApp.Server
{
@telfaria
telfaria / カーナビ用に動画を変換する.ps1
Created May 31, 2023 08:28
カーナビ用(320x240/MPRG4/AAC-LC/1Mbps)に動画を一括変換するPowerShellスクリプト
# カーナビ用に変更するには以下の設定にする
# 320x240(16:9/4:3, MPEG-4, AAC-LC, 1000kbps)
#サポートしているffmpegは
# ffmpeg version 6.0-essentials_build-www.gyan.dev
#です
if($Args.Length -ne 1){
Write-Output "Argument Error";
exit(1);
@telfaria
telfaria / ReiwaTestConsole.cs
Created April 20, 2019 10:00
Japanise new era test program.
using System;
namespace ReiwaTestConsole
{
class Program
{
static void Main(string[] args)
{
var jc = new System.Globalization.JapaneseCalendar();
@telfaria
telfaria / mp4-file-move-to-target-folder.ps1
Last active April 3, 2018 17:36
フォルダ名からタイトルを検索して移動するPowerShellスクリプト
$Folders = Get-ChildItem * | Where-Object { $_.PSIsContainer}
foreach($dName in $Folders)
{
echo "Search: $dName"
$title = $dname.Name
$targerfiles = Get-ChildItem *.MP4
foreach($file in $targerfiles)
{
if ($file.Name -like "*$title*")
{