Skip to content

Instantly share code, notes, and snippets.

View TatsuyaOGth's full-sized avatar

Tatsuya Ogusu TatsuyaOGth

View GitHub Profile
@TatsuyaOGth
TatsuyaOGth / Easing.cs
Last active December 23, 2021 11:55
Easing Class for Unity
using UnityEngine;
using System.Collections;
/// <summary>
/// Easing Functions,
/// All Arguments "t" are values between 0.0f to 1.0f.
/// http://easings.net/
/// </summary>
public static class Easing
{
#!/bin/sh
# can additional arguments
# ex.: $ sh rsync_tool.sh --checksum
echo "Input source directory path (no need end slash)"
read SRC
echo "Input destination directory path (no need end slash)"
read DST
@TatsuyaOGth
TatsuyaOGth / rsync_config.txt
Last active September 17, 2021 12:53
rsync_commands
# ローカルフォルダ
local="rsync_test_dir"
# リモートフォルダ
remote="rsync://[email protected]/public/rsync"
# ローカルのバックアップ保存先
local_backup="./_deleted_files/$(date +%Y-%m-%d_%H-%M-%S)"
# リモートのバックアップの保存先
public static T DeepCopy<T>(T src)
{
using (var stream = new MemoryStream())
{
var serializer = new XmlSerializer(typeof(T));
serializer.Serialize(stream, src);
stream.Seek(0, SeekOrigin.Begin);
return (T)serializer.Deserialize(stream);
}
}
@TatsuyaOGth
TatsuyaOGth / file0.txt
Last active September 15, 2016 12:41
【C++】細線化した画像のセグメント分割 ref: http://qiita.com/TatsuyaOGth/items/292317e9f5a5256098e7
P_{i, j} = (p_0, p_1, ... p_{j-1} ) \\
p_j = (x, y)
@TatsuyaOGth
TatsuyaOGth / file0.txt
Last active May 9, 2017 10:07
【C++】画像の細線化処理(Hilditchの方法) ref: http://qiita.com/TatsuyaOGth/items/45965e1632f41f3eb139
N_8 = \left\{ P_1, P_2, P_3, P_4, P_5, P_6, P_7, P_8 \right\}
@TatsuyaOGth
TatsuyaOGth / utils.h
Created November 4, 2015 12:31
common utility file for my openFrameworks project
#pragma once
#include "ofMain.h"
/**
* Logger util
*/
#define __FILE_AND_LINE__ ofSplitString(ofToString(__FILE__), "/").back()+"|line:"+ofToString(__LINE__)
#define LOG_NOTICE ofLogNotice(__FILE_AND_LINE__)
#define LOG_WARNING ofLogWarning(__FILE_AND_LINE__)
@TatsuyaOGth
TatsuyaOGth / particle_with_pointsprite_example.cpp
Last active August 29, 2015 14:20
An openFrameworks example of particle generation with point sprite.
#include "ofMain.h"
#include "ofxAnimationPrimitives.h"
static const string SHADER_FILEPATH_VERT = "shaders/pointSprite.vert";
static const string SHADER_FILEPATH_FRAG = "shaders/pointSprite.frag";
static const string TEXTURE_FILE_DIR = "textures";
class Particle : public ofxAnimationPrimitives::Instance
{
const int mNum;
@TatsuyaOGth
TatsuyaOGth / .vimrc
Created January 6, 2015 16:25
my vimrc
" reference: http://d.hatena.ne.jp/mtbtaizo/20080622
"# set nocompatible "vi非互換モード
"#######################
" 表示系
"#######################
set number "行番号表示
set showmode "モード表示
set title "編集中のファイル名を表示
set ruler "ルーラーの表示
@TatsuyaOGth
TatsuyaOGth / auto_screen_logger.py
Created January 2, 2015 19:28
Automatic Screen Logger Python code for Mac OSX
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import time
import subprocess
from datetime import datetime
argv = sys.argv
if len(argv) > 1: