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 / Slack.cs
Created June 15, 2016 09:49
Unity to slack webhook url
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using MiniJSON;
namespace AppKit
{
public class Slack
{
string _webhookUrl;
@asus4
asus4 / LittleCaffeine.h
Last active March 11, 2024 15:16
Prevent sleep and screensaver while the application running. ref: http://qiita.com/asus4/items/02b5096a937bbd419f3e
//
// LittleCaffeine.h
//
// This is tiny utility inspired by Caffeine http://lightheadsw.com/caffeine/
//
// Created by Koki Ibukuro on 2014/04/01.
// Copyright (c) 2014年 Koki Ibukuro. All rights reserved.
//
#pragma once
@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 / ofxLPF.cpp
Created June 17, 2014 12:36
Simple Low Pass Filter for openFrameworks
//
// ofxLPF.cpp
// Simple Low Pass Filter
//
// Created by Koki Ibukuro on 6/17/14.
//
//
//http://baumdevblog.blogspot.jp/2010/11/butterworth-lowpass-filter-coefficients.html
@asus4
asus4 / GraphAttribute.cs
Last active November 6, 2023 14:53
Show graph as unity custom attribute
/*
MIT License
Copyright (c) 2021 Koki Ibukuro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@asus4
asus4 / lut_maker.py
Created April 3, 2016 11:43
Make LUT Texture
#!/usr/bin/env python
# coding: UTF-8
import cv2
import numpy as np
def make_lut256x16(exportPath):
''' 256 x 16 LUT '''
colors = []
@asus4
asus4 / PCA9622.py
Created July 26, 2018 08:43
Control PCA9622 I2C LED Driver from Raspberry PI
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" PCA9622 """
from __future__ import print_function
import time
import smbus
@asus4
asus4 / NativeArrayExtension.cs
Last active May 10, 2023 12:12
Safe Conversion of NativeArray <-> byte[] in Unity
using Unity.Collections;
public static class NativeArrayExtension
{
public static byte[] ToRawBytes<T>(this NativeArray<T> arr) where T : struct
{
var slice = new NativeSlice<T>(arr).SliceConvert<byte>();
var bytes = new byte[slice.Length];
slice.CopyTo(bytes);
return bytes;
@asus4
asus4 / setup_apcmini.py
Last active April 29, 2023 02:19
Setup AKAI APC mini button colors without Ableton Live
#!/usr/bin/env python
# coding: UTF-8
'''
Setup apc mini colors without Ablton Live
----------
> brew install portmidi
@asus4
asus4 / ffmpeg_hevc_options.txt
Last active April 15, 2023 23:44
ffmpeg GPU HEVC(H.265) encoder options
Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
General capabilities: delay
Threading capabilities: none
Supported pixel formats: yuv420p nv12 p010le yuv444p yuv444p16le bgr0 rgb0 cuda d3d11
hevc_nvenc AVOptions:
-preset <int> E..V.... Set the encoding preset (from 0 to 11) (default medium)
default E..V....
slow E..V.... hq 2 passes
medium E..V.... hq 1 pass