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 / tracking.py
Created May 15, 2017 08:39
OpenCv3 Tracking API on Python3
# coding:utf-8
# pylint: disable=C0111,C0103,E0401
import time
import cv2 as cv
class App(object):
def __init__(self, algorithm):
@asus4
asus4 / VideoSupportPlugin.java
Last active February 21, 2025 09:43
Check supported resolution from unity
package asus4.videosupportedplugin;
import android.media.MediaCodecInfo;
import android.media.MediaCodecList;
/**
* Created by ibu on 2017/03/12.
*/
public final class VideoSupportedPlugin {
@asus4
asus4 / name.sh
Created February 16, 2017 04:30
名前占いの画像をダウンロードする!
#!/bin/bash
if [ $# -ne 2 ]; then
echo "option is ./namae.sh 性 名" 1>&2
exit 1
fi
echo "downloading $1 $2"
curl "https://enamae.net/download.php?sei=$1&mei=$2" > "$1$2.jpg"
@asus4
asus4 / restart-bluetooth.sh
Created December 28, 2016 12:52
Restart bluetooth from Alfred ( require https://github.com/toy/blueutil )
/usr/local/bin/blueutil power 0
sleep 1
/usr/local/bin/blueutil power 1
osascript -e 'display notification "Restarted" with title "Bluetooth" '
@asus4
asus4 / LPF.cs
Created December 2, 2016 14:19
Simple low pass filter (Unity support)
using System;
// Port from c++
// https://gist.github.com/asus4/1ec57e68ba9fa1363a6f
public class LPF
{
double[] ax = new double[3];
double[] by = new double[3];
double[] xv = new double[3];
@asus4
asus4 / GraphAttribute.cs
Last active June 13, 2024 10:47
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 / 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;
#!/bin/sh
echo "this is test"
#!/bin/sh
# psdを全部pngで書き出す
for f in *.psd; do convert $f[0] ${f/psd/png}; done
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>job.mackerl</string>
<key>ProgramArguments</key>
<array>
<string>/PATH_TO_MACKEREL_AGENT/mackerel-agent</string>
<string>-conf=/Users/USER/Library/mackerel-agent/mackerel-agent.conf</string>