Skip to content

Instantly share code, notes, and snippets.

View halby24's full-sized avatar
🐣
チーヨ

HALBY halby24

🐣
チーヨ
View GitHub Profile
@mst-mkt
mst-mkt / nabeatsu.d.ts
Last active February 14, 2024 07:02
TypeScriptの型で世界のナベアツ
type Natural = 0[];
type Zero = [];
type One = [0];
type AhoSuffix = '(アホ)';
type Length<Array extends unknown[]> = Extract<Array['length'], number>;
type Add<N1 extends Natural, N2 extends Natural> = [...N1, ...N2];
type AddNum<N1 extends number, N2 extends number> = Length<[...NumToNat<N1>, ...NumToNat<N2>]>;
type Sub<N1 extends Natural, N2 extends Natural> = N1 extends [...N2, ...infer M]
? M
@phi16
phi16 / Wire.shader
Last active January 21, 2024 15:32
Wire
Shader "phi16/Wire"
{
Properties
{
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
LOD 100
ZWrite Off
@phi16
phi16 / AnimationLooper.cs
Last active January 11, 2024 09:56
Make a loop animation from non-loop (but nearly looping) animation
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class AnimationLooper : MonoBehaviour {
[SerializeField] private AnimationClip clip;
[SerializeField] private float overlapTime = 0.5f;
[SerializeField] private string path;
#if UNITY_EDITOR
@TORISOUP
TORISOUP / AvatarBoneNameFixer.cs
Last active September 4, 2023 14:32
アバター内に含まれている重複したGameObject名を修正するやつ
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace TORISOUP.Editor.AvatarBoneNameFixer
{
public class AvatarBoneNameFixer : EditorWindow
{
[MenuItem("GameObject/AvatarBoneNameFixer", false, 0)]
@bgolus
bgolus / WorldNormalFromDepthTexture.shader
Last active April 25, 2024 03:51
Different methods for getting World Normal from Depth Texture, without any external script dependencies.
Shader "WorldNormalFromDepthTexture"
{
Properties {
[KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
LOD 100
@0xbadfca11
0xbadfca11 / Wrong usage Optimize-VHD.md
Created January 5, 2016 09:38
お前らの Optimize-VHD の使い方は間違っている
  • ゲストでsdelete -z→シャットダウンして→Optimize-VHD -Mode Prezeroed
  • ホストでMount-VHDsdelete -zDismount-VHDOptimize-VHD -Mode Prezeroed

これらは時間と書き込み量を浪費しているだけだから今すぐ止めて
Mount-VHD <VHD> [-NoDriveLetter] -ReadOnly -Passthru | Optimize-VHD [-Mode {Quick|Full}] -Passthru | Dismount-VHD
を使うべき。

なんで?

読み取り専用でマウントしている時に Optimize-VHD をすればディスクイメージ内の NTFS から得られる空き領域情報を利用するから。

@edokeh
edokeh / index.js
Last active May 1, 2024 20:20
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \