Skip to content

Instantly share code, notes, and snippets.

View shiena's full-sized avatar

KOGA Mitsuhiro shiena

View GitHub Profile
@yukimochi
yukimochi / readme.md
Last active November 7, 2021 15:05
YouTube Live -> VRChat-OSC-Bridge SuperChat Notifier.

YouTube Live -> VRChat-OSC-Bridge SuperChat Notifier.

VRChat にスパチャが過去1秒間に発生したかをOSCメッセージで毎秒送信するブックマークレット (VRChat OSC Bridge 専用ツール)

説明

VRChat OSC Bridge が起動している状態で、 YouTube Live のコメント欄をポップアウトし、そのウィンドウに対して spc_to_osc.min.jsjavascript: 以降のコードを入力します。

実行すると、 所定のOSCメッセージが毎秒 /VRC_OSC/SPC に送信されます。

メッセージ内容

@radiatoryang
radiatoryang / SmoothVideoPlaylist.cs
Last active March 27, 2025 16:07
short Unity C# script example for smoothly cutting / playing a playllist of VideoClips, by using one VideoPlayer (activeCam) to play the video and another VideoPlayer (otherCam) to cue up the next video... MIT License.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
public class SmoothVideoPlaylist : MonoBehaviour {
// to smoothly cut between two videos, we need two VideoPlayers
// make sure you create two VideoPlayers and assign them in the Inspector
public VideoPlayer activeCam, otherCam;
@sh-akira
sh-akira / KeyboardAction.cs
Created July 28, 2018 17:28
Unity Keyboard Event Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
public class KeyboardEventArgs : EventArgs
{
public int KeyCode { get; }
@tarukosu
tarukosu / cameraToWorld.cs
Last active November 30, 2022 17:40
HoloLens カメラ座標から世界座標への変換
void OnPhotoCaptured(PhotoCapture.PhotoCaptureResult result, PhotoCaptureFrame photoCaptureFrame)
{
Matrix4x4 cameraToWorldMatrix;
photoCaptureFrame.TryGetCameraToWorldMatrix(out cameraToWorldMatrix);
Matrix4x4 projectionMatrix;
photoCaptureFrame.TryGetProjectionMatrix(out projectionMatrix);
var imagePosZeroToOne = new Vector2(pixelPos.x / imageWidth, 1 - (pixelPos.y / imageHeight));
var imagePosProjected = (imagePosZeroToOne * 2) - new Vector2(1, 1); // -1 to 1 space
@voluntas
voluntas / saikyo.rst
Last active September 13, 2023 02:33
ぼくのかんがえたさいきょうの超低遅延大規模配信

ぼくのかんがえたさいきょうの超低遅延大規模配信

更新:2018-08-20
作者:@voluntas
バージョン:18.8.3
URL:https://voluntas.github.io/
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 8, 2025 14:18
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@demonixis
demonixis / XRSubSystemTest.cs
Created January 13, 2020 13:28
A demonstration of how to use the all new XRSubsystem with Unity 2019.3+
using UnityEngine;
using UnityEngine.XR;
using UnityEngine.XR.Management;
public class XRSubSystemTest : MonoBehaviour
{
public void Start()
{
var xrSettings = XRGeneralSettings.Instance;
if (xrSettings == null)
@layneson
layneson / build.zig
Created April 15, 2020 15:33
Custom step in build.zig
const std = @import("std");
const Builder = std.build.Builder;
const Step = std.build.Step;
pub fn build(b: *Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("hw", "hw.zig");
exe.setTarget(target);
@decoc
decoc / CompileLocker.cs
Last active February 11, 2023 08:48
This editor utility can lock/unlock unity script compile from menu item. See more https://raspberly.hateblo.jp/entry/InvalidateUnityCompile
using UnityEngine;
using UnityEditor;
/// <summary>
/// This editor utility can lock/unlock unity script compile from menu item.
/// See more https://raspberly.hateblo.jp/entry/InvalidateUnityCompile
/// </summary>
public static class CompileLocker
{
[MenuItem("Compile/Lock", false, 1)]
@Refsa
Refsa / GrabScreenFeature.cs
Last active February 14, 2025 10:54
Unity URP custom grab pass
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public class GrabScreenFeature : ScriptableRendererFeature
{
[System.Serializable]
public class Settings