Skip to content

Instantly share code, notes, and snippets.

View 0V's full-sized avatar
🛌
Always sleeping

G2 0V

🛌
Always sleeping
View GitHub Profile
javascript:(function(){var url=/shorts\/(.+)/gi.exec(location.href)[1];var open='https://www.youtube.com/watch?v=%27+url;location.href=open;})();
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@0V
0V / url_to_ezproxy.js
Last active January 16, 2023 10:45
Bookmarklet
javascript:(function(){var url=location.href;var open='https://waseda.idm.oclc.org/login?url=%27+url;location.href=open;})();
@0V
0V / vector3d.h
Last active March 21, 2019 09:49
template 3d vector
#ifndef RAYTRACER_VECTOR3D_
#define RAYTRACER_VECTOR3D_
#include <cstddef>
#include <cmath>
template <typename T>
class Vector3d
{
private:
namespace ObjectDumpTest
{
public class SomeCollections
{
public int[] SomeArray { get; set; } = new[] { 0, 1, 2, 3, 4 };
public List<int> SomeList { get; set; } = new List<int> { 0, 1, 2, 3, 4 };
public Dictionary<string, int> SomeLDictionary { get; set; } = new Dictionary<string, int>() { { "One", 1 }, { "Two", 2 } };
public IEnumerable<int> SomeEnumerable { get { return SomeList; } }
public IEnumerable<int> SomeLazyEnumerable { get { return LazyNumber(); } }
using RxVRTK;
using UniRx;
using UnityEngine;
public class SomeObject : RxVRTK_InteractableObject
{
protected void Start()
{
this.StartUsingAsObservable()
.Subscribe(user =>
VRTK_ControllerEvents controllerEvents = GetComponent<VRTK_ControllerEvents>();
controllerEvents.TriggerPressedAsObservable()
.Subscribe(_ =>
{
Debug.Log("Trigger Pressed!");
});
@0V
0V / RandomBoxMuller.cs
Last active October 23, 2018 14:49
Ranged Box–Muller's method for Unity
using UnityEngine;
/// <summary>
/// Box–Muller's method
/// </summary>
public class RandomBoxMuller
{
public static float Range(float min, float max)
{
while (true)
var controller = GetComponent<SteamVRInputRx>();
controller.ControllerState
.Where(s => s == SteamVRControllerState.TriggerPressDown)
.Subscribe(_ =>
{
// Triggerが引かれたら何かをする
});
@0V
0V / wallis_fomula.rs
Created August 8, 2018 12:27
Wallis' Formula by Rust
use std::io;
fn main() {
println!("Please Input Count > ");
let mut count = String::new();
io::stdin().read_line(&mut count).expect("Failed to read line");;
let count: u64 = count.trim().parse().expect("Need u64");
println!("PI = {}",wallis_fomula(count));