Skip to content

Instantly share code, notes, and snippets.

View asus4's full-sized avatar
:octocat:
Working from home

Koki Ibukuro asus4

:octocat:
Working from home
View GitHub Profile
@asus4
asus4 / run_apk.sh
Created May 13, 2026 11:17
Run apk and start app
#!/usr/bin/env bash
set -euo pipefail
shopt -s nullglob
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
APK_PATH=""
LOG_TAGS=(Unity tflite onnxruntime mlas)
usage() {
cat <<'EOF'
@asus4
asus4 / Microsoft.PowerShell_profile.ps1
Created May 13, 2026 07:02
My PowerShell profile
Set-PSReadLineKeyHandler -Chord Tab -Function MenuComplete
Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
[Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new()
$Local:word = $wordToComplete.Replace('"', '""')
$Local:ast = $commandAst.ToString().Replace('"', '""')
{
"models": [
{
"name": "models/embedding-gecko-001",
"version": "001",
"displayName": "Embedding Gecko",
"description": "Obtain a distributed representation of a text.",
"inputTokenLimit": 1024,
"outputTokenLimit": 1,
"supportedGenerationMethods": [
@asus4
asus4 / export_yolo11_seg.ipynb
Created February 7, 2025 12:50
Export yolo11 Seg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asus4
asus4 / GraphicsBufferExtensions.cs
Last active February 7, 2025 12:14
Set ReadOnlySpan<T> to GraphicsBuffer in Unity
using System;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
namespace TheNameSpace
{
public static class GraphicsBufferExtensions
{
/// <summary>
@asus4
asus4 / ARBackgroundRendererFeatureExtended.cs
Created July 21, 2024 02:51
Expose the AR background texture to the global in ARBackgroundRendererFeature.cs
/*
Modified from
`Packages/com.unity.xr.arfoundation/Runtime/ARFoundation/ARBackgroundRendererFeature.cs`
Licensed under the Unity Companion License for Unity-dependent projects (see [Unity Companion License](https://unity3d.com/legal/licenses/unity_companion_license)).
*/
using UnityEngine;
using UnityEngine.Rendering;
#if MODULE_URP_ENABLED
@asus4
asus4 / curve-shapekey-to-mesh.py
Created July 13, 2024 21:29
A Blender script that converts all shape keys in a Curve object to a mesh with shape keys
'''
A Blender script that
1. Convert all shape keys in a curve object to mesh
2. Join all shape keys to a new mesh object
'''
import bpy
def resetAllShapeKeys(target):
for key in target.data.shape_keys.key_blocks:
@asus4
asus4 / ListAllReverbPresetSettings.cs
Created November 30, 2023 14:52
List All Reverb Preset Parameters
using System;
using System.Text;
using UnityEngine;
public class ListAllReverbPresetSettings : MonoBehaviour
{
[SerializeField]
AudioReverbFilter filter;
private void Start()
@asus4
asus4 / tsv2localizable.py
Last active July 17, 2022 06:07
Converts a TSV file into Xcode Localizable strings
#!/usr/bin/python3
import argparse
import csv
import datetime
# A simple script that converts a TSV file into Xcode Localizable strings
# TSV format:
'''
id, comment, en, ja
@asus4
asus4 / tf-lite-unity-sample-Resize.shader
Created June 14, 2020 07:46
tf-lite-unity-sample Resize.shader
Shader "Hidden/TFLite/Resize"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Cull Off
ZWrite Off