Skip to content

Instantly share code, notes, and snippets.

Avatar
🛌
Always sleeping

G2U 0V

🛌
Always sleeping
View GitHub Profile
View url_to_ezproxy.js
javascript:(function(){var url=location.href;var open="https://login.ez.wul.waseda.ac.jp/login?url="+url;location.href=open;})();
@0V
0V / vector3d.h
Last active Mar 21, 2019
template 3d vector
View vector3d.h
#ifndef RAYTRACER_VECTOR3D_
#define RAYTRACER_VECTOR3D_
#include <cstddef>
#include <cmath>
template <typename T>
class Vector3d
{
private:
View ObjectDumperSample.cs
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(); } }
View RxVRTK_InteractableObjectSample.cs
using RxVRTK;
using UniRx;
using UnityEngine;
public class SomeObject : RxVRTK_InteractableObject
{
protected void Start()
{
this.StartUsingAsObservable()
.Subscribe(user =>
View TriggerPressedAsObservableSample.cs
VRTK_ControllerEvents controllerEvents = GetComponent<VRTK_ControllerEvents>();
controllerEvents.TriggerPressedAsObservable()
.Subscribe(_ =>
{
Debug.Log("Trigger Pressed!");
});
@0V
0V / RandomBoxMuller.cs
Last active Oct 23, 2018
Ranged Box–Muller's method for Unity
View RandomBoxMuller.cs
using UnityEngine;
/// <summary>
/// Box–Muller's method
/// </summary>
public class RandomBoxMuller
{
public static float Range(float min, float max)
{
while (true)
View SteamVRInputRxSample.cs
var controller = GetComponent<SteamVRInputRx>();
controller.ControllerState
.Where(s => s == SteamVRControllerState.TriggerPressDown)
.Subscribe(_ =>
{
// Triggerが引かれたら何かをする
});
@0V
0V / wallis_fomula.rs
Created Aug 8, 2018
Wallis' Formula by Rust
View wallis_fomula.rs
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));
View DeltatimeSample.cs
[SerializeField]
private float speed = 10f;
void Update () {
transform.Translate (speed * Time.deltaTime, 0, 0);
}
View ToNumbering.cs
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
public class ToNumbering : EditorWindow
{
private string baseName = "";
// Add menu item named "My Window" to the Window menu