Skip to content

Instantly share code, notes, and snippets.

View taka-oyama's full-sized avatar
🐌

Takayasu Oyama taka-oyama

🐌
  • COLOPL Inc.
  • Tokyo, Japan
  • 09:18 (UTC +09:00)
  • X @taka_oyama
View GitHub Profile
@taka-oyama
taka-oyama / software_engineer_good_reads
Created July 25, 2023 09:09
Educational reads for Software Engineering
https://github.com/petergoldstein/dalli/issues/956#issuecomment-1464198149
Identity Map
https://en.wikipedia.org/wiki/Identity_map_pattern
@taka-oyama
taka-oyama / ExitPlayModeOnScriptCompile.cs
Created October 5, 2016 02:11
This script exits play mode whenever script compilation is detected during an editor update.
// Copyright Cape Guy Ltd. 2015. http://capeguy.co.uk.
// Provided under the terms of the MIT license -
// http://opensource.org/licenses/MIT. Cape Guy accepts
// no responsibility for any damages, financial or otherwise,
// incurred as a result of using this code.
using UnityEngine;
using UnityEditor;
/// <summary>
@taka-oyama
taka-oyama / GetFilesRecursive.cs
Last active October 5, 2016 01:37
Get all files under a directory recursively
using System.Collections.Generic;
using System.IO;
public class Tester
{
static List<FileInfo> GetFilesRecursive(string path, string matchFormat = "*")
{
var files = new List<FileInfo>();
var lookups = new Stack<DirectoryInfo>(new [] { new DirectoryInfo(path) });
@taka-oyama
taka-oyama / ServerTime.cs
Last active August 29, 2015 14:16
Server Time Context in C#
// ローカルのTimeZoneに依存しないTimeClass
using System;
using System.ComponentModel;
[TypeConverter(typeof(ServerTimeConverter))]
public struct ServerTime : IComparable, IComparable<ServerTime>, IEquatable<ServerTime>
{
static DateTimeOffset timeContext;
static TimeSpan offset;
@taka-oyama
taka-oyama / Capfile
Last active October 5, 2016 02:02
Capistrano 3 Sample for Deploying to Development
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/bundler'
#require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano3/unicorn'
require 'whenever/capistrano'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.