Skip to content

Instantly share code, notes, and snippets.

@takashicompany
takashicompany / movie_to_gif_animation.sh
Last active January 6, 2023 07:48
動画ファイルをキレイなgifにしてくれるコマンドライン
#!/bin/bash
CMDNAME=`basename $0`
while getopts i:s:f:e: OPT
do
case $OPT in
"i" ) is_import="TRUE" ; import="$OPTARG";;
"s" ) is_size="TRUE" ; size="$OPTARG" ;;
"f" ) is_fps="TRUE" ; fps="$OPTARG" ;;
@takashicompany
takashicompany / subtree-template.sh
Last active October 8, 2018 08:44
git-subtree support shell.
#!/bin/bash
repo=<subtree-repo path>
remote=<subtree-repo remote name>
branch=<subtree branch>
path=<local subtree path>
if [ $# -eq 0 ]; then
echo "this is git-subtree-suppot tool.\noptions:\n init\n pull\n push"
exit 1
@takashicompany
takashicompany / OffscreenCaptureManager.cs
Created December 2, 2017 06:56
プレイヤーの画面とは別視点のリプレイを録画する
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// UnityEngineと名前空間を分ける
using ocv = OpenCVForUnity;
// 録画に使いたいカメラにつけるコンポーネント
[RequireComponent(typeof(Camera))]
public class OffscreenCaptureManager : MonoBehaviour
private static string[] _numChars = new string[]
{
"⓪","①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","㉑","㉒","㉓","㉔","㉕","㉖","㉗","㉘","㉙","㉚","㉛","㉜","㉝","㉞","㉟","㊱","㊲","㊳","㊴","㊵","㊶","㊷","㊸","㊹","㊺","㊻","㊼","㊽","㊾","㊿"
};
namespace TakashiCompany.Unity.Extension
{
using UnityEngine;
/// <summary>
/// UnityEngine.Animation extension.
/// </summary>
public static class AnimationSampleExtension
{
public static void SampleWithTime(
@takashicompany
takashicompany / PoolingContainer.cs
Created October 24, 2016 07:57
[Unity] GameObjectを生成・再利用するクラス
using UnityEngine;
using System.Collections.Generic;
/// <summary>
/// GameObjectを再利用するコンテイナー
/// </summary>
[System.Serializable]
public class PoolingContainer
{
[SerializeField]
@takashicompany
takashicompany / PhotonExtension.cs
Last active June 21, 2016 10:34
Unity Simple Photon Client and Sample.
// @takashicompany
using System;
using System.Reflection;
using System.Collections.Generic;
using ExitGames.Client.Photon;
using ExitGames.Client.Photon.LoadBalancing;
/// <summary>
@takashicompany
takashicompany / setting.json
Created February 29, 2016 14:01
Visual Studio Code setting.
// Place your settings in this file to overwrite the default settings
{
"editor.renderWhitespace": true,
"editor.insertSpaces": false,
"editor.quickSuggestions": true,
"editor.autoClosingBrackets": false,
"editor.referenceInfos": false
}
@takashicompany
takashicompany / iyashi-lgtm-json.js
Created January 22, 2016 00:29
癒やしLGTMのブックマークレット改良版
javascript:(function(){
window.callback = function(json) {
javascript:prompt("【癒やしLGTM】下記のテキストをコピーしてGitHubのコメントに貼り付けよう!!\n※貼り付けた後、画像が表示されるまで少し時間がかかります。", json.lgtm);
};
var d = document;
var e = d.createElement('script');
e.charset='utf-8';
e.src = 'http://takashicompany.com/api/lgtm/jsonp';
d.getElementsByTagName('head')[0].appendChild(e);
})();
綁、查、卡
擊、徵、你
變、嗎、幫
你、吧、黃
晚、啊、夠
凳、间、楣
鏟、內、靶
錄、步、跑
氧、咖、啡
拖、啤、德