Skip to content

Instantly share code, notes, and snippets.

@paraself
paraself / EditorPlayMode
Last active October 30, 2023 14:38
Unity Play Mode Detection
//originally adopted from
//http://answers.unity3d.com/questions/447701/event-for-unity-editor-pause-and-playstop-events.html
//with a few modifications which makes the event firing nicer and cleaner
//Usage Example :
//
//using UnityEditor;
//using UnityEngine;
//
//[InitializeOnLoad]
//public class SingleEntryPoint
@peroon
peroon / gist:53800fa4c0c04c58c5aa
Created June 15, 2015 12:44
Tweenさせて元に戻す DOTween
transform.DOScale(targetScale * 2, 1.0f).SetLoops(2, LoopType.Yoyo);

子育て5ヶ月やって、先に知っておきたかったこと

現時点で子どもがちょうど5ヶ月になる。
子育ては、やりながらノウハウが溜まっていくと実感している。
その中で、「これはもっと早く知っておけば良かった」と思ったものを記録しておく。

夜長く眠れるようにする

生後すぐは生活サイクルが変わって体力的なしんどさがある。

@hkrn
hkrn / README.md
Last active February 8, 2019 04:40
nanoem のマニュアル

nanoem

2017/8/5 付で readthedocs に移動しました

This document has been moved to readthedocs since 8/5/2017

@ryosan-470
ryosan-470 / pkcrack_for_osx.diff
Last active February 28, 2017 08:21
The patch of pkcrack to build on Mac OSX and Homebrew
diff --git Makefile Makefile
index af87e95..04928f1 100644
--- Makefile
+++ Makefile
@@ -1,5 +1,5 @@
CC=gcc
-CFLAGS=-O6 -Wall
+CFLAGS=-O3 -Wall
#CFLAGS=-g
@keijiro
keijiro / 00_README.md
Last active April 6, 2022 07:26
About Xcode Manipulation API in Unity

Unity から出力される Xcode プロジェクトをカスタマイズする方法 - Xcode Manipulation API

Unity 5 には Xcode Manipulation API が標準で搭載されており、これを使うことで、Unity の出力する Xcode プロジェクトを比較的簡単にカスタマイズすることができます。

ここでは例として、Unity から出力される Xcode プロジェクトの Info.plist ファイルを書き換えてみます。

下にある XcodeProjectUpdater.cs がそれです。このファイルを Editor ディレクトリ下に放り込んでおきます。すると、ビルド時に Info.plist を書き換えて、“TestEntry” というキーに “Hello” という値を設定します。見たそのまんまのシンプルな内容です。

鍵となるのは UnityEditor.iOS.Xcode に用意されている PlistDocument と PBXProject です。これらのクラスを使うことで、plist ファイルや Xcode プロジェクトファイルの書き換えが簡単に行えるわけです。

@kaiinui
kaiinui / eventbus.md
Last active March 3, 2017 03:54
Android開発いろいろ

EventBus

EventBus は必ず onStart()onStop() で呼ぶ。バックグラウンドで色々動かれて困る。 また、onStop() では super.onStop() よりも 先に 呼ぶ。

@Override
protected void onStart() {
 super.onStart();
@mizoR
mizoR / gist:351c36eeb1282570d199
Created January 10, 2015 06:30
Ruby で 月ごとに繰り返す
require 'date'
# 実際は ActiveSupport の機能をつかう
class Date
def beginning_of_month
self.class.new(self.year, self.month, 1)
end
end
class MonthlyEnumerator < Enumerator
@phi-jp
phi-jp / StringExtensions.cs
Last active August 29, 2015 14:11
string extension
/*
* Copyright (c) 2014 @phi_jp
*/
using System;
namespace tm.Extensions {
public static class StringExtensions {
@franmontiel
franmontiel / PersistentCookieStore.java
Last active April 1, 2024 05:40
A persistent CookieStore implementation for use in Android with HTTPUrlConnection or OkHttp 2. -- For a OkHttp 3 persistent CookieJar implementation you can use this library: https://github.com/franmontiel/PersistentCookieJar
/*
* Copyright (c) 2015 Fran Montiel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software