Skip to content

Instantly share code, notes, and snippets.

View Akira-Hayasaka's full-sized avatar
🏠
Working from home

Akira Hayasaka Akira-Hayasaka

🏠
Working from home
View GitHub Profile
@nekomimi-daimao
nekomimi-daimao / LogWriter.cs
Last active December 13, 2023 19:35
Unity, write logfile
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace Nekomimi.Daimao
@mattirish
mattirish / conda_symlink.md
Last active November 5, 2024 19:13
Easily move a conda environment to a different drive on Windows without touching with conda
Shader "Hidden/JumpFloodOutline"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "PreviewType" = "Plane" }
Cull Off ZWrite Off ZTest Always
@madelinegannon
madelinegannon / jetson-nano_openFrameworks_setup_tutorial.md
Last active February 4, 2024 16:41
How to Set Up the NVIDIA Jetson Nano for openFrameworks
@davidfoster
davidfoster / KalmanFilterFloat.cs
Last active June 19, 2024 12:52
Simple Kalman filtering in Unity.
using System.Collections.Generic;
/// <summary>A Kalman filter implementation for <c>float</c> values.</summary>
public class KalmanFilterFloat {
//-----------------------------------------------------------------------------------------
// Constants:
//-----------------------------------------------------------------------------------------
public const float DEFAULT_Q = 0.000001f;
@Santarh
Santarh / MyTemplate.shader
Created December 24, 2017 12:35
Unity Shader Template
Shader "SantarhTemplate"
{
Properties
{
}
SubShader
{
Tags { "RenderType" = "Opaque" "Queue" = "Geometry" }
@kenmori
kenmori / prototype__proto__.md
Last active September 23, 2020 01:34
prototypeと__proto__の違い

問350

prototype と __proto__ の違いを説明してください

・prototype・・・Functionオブジェクトだけがもつプロパティ。参照先はオブジェクト。

・__proto__・・・全てのオブジェクトが持つ内部プロパティ。プロトタイプチェーン。暗黙の参照(自身のプロパティになければこの__proto__先を辿ること)を実現する内部で実装されているプロパティ。
@motoishmz
motoishmz / ofXml_to_std::wstring.h
Last active October 22, 2018 02:08
openframeworks example: convert std::string with an external file --> std::wstring
#include <codecvt>
#include "ofxTrueTypeFontUL2.h" // https://github.com/kentaroid/ofxTrueTypeFontUL2
std::wstring text;
ofxTrueTypeFontUL2 typeface;
void ofApp::setup() {
ofXml xml("multilingual_words.xml"); // have to be saved as UTF-8 with BOM
// do something with xml...
std::string text_from_xml = xml.getAttribute("my_chinese_word");
@heisters
heisters / DeferredRenderer.cpp
Last active November 14, 2017 08:18
Deferred Renderer for Cinder (glNext)
#include "DeferredRenderer.h"
#include "cinder/gl/gl.h"
#include "cinder/Log.h"
#include "cinder/Buffer.h"
#include "DeferredRendererShaders.h"
#include "DeferredRenderer_random_png.h"
using namespace ci;
using namespace std;
@mantissa
mantissa / DrawInstances.frag
Created April 26, 2015 19:26
Drawing instanced meshes using matrices contained in textures (OpenFrameworks)
#version 120
#extension GL_EXT_gpu_shader4 : require
void main(){
gl_FragColor = gl_Color;
}