Skip to content

Instantly share code, notes, and snippets.

View s2kw's full-sized avatar

s2kw s2kw

  • Deluxe Games Inc
  • Tokyo
View GitHub Profile
@d-kuro
d-kuro / git_conflict.md
Created October 18, 2018 12:21
コンフリクトしたときの --theirs と --ours

コンフリクトしたときの --theirs と --ours

よく忘れるやつ

merge

$ git checkout branch_b
$ git merge branch_a
@Akiyah
Akiyah / jibanyan_equation
Created November 12, 2014 00:28
jibanyan_equation
jibanyan_equation <- function(x,y) {
min(max(min(1-(x/108)^2-(y/94)^2,y),min(1-((abs(x)-119)/103)^2-((y-56)/86)^2,1-((abs(x)-15)/77)^2-((y-119)/100)^2),1-((abs(x)-42)/66)^2-(y/55)^2,min(55+y,51-abs(x),-y)),3*abs(y-100)-2*(x-75)) *
min(min(max(min(1-(x/106)^2-(y/92)^2,y),min(1-((abs(x)-119)/101)^2-((y-56)/84)^2,((abs(x)-99)/40)^2+((y-54)/86)^2-1,92-abs(x)),1-((abs(x)-42)/64)^2-(y/53)^2),min(((abs(x)-52)/26)^2+((y+28)/26)^2-1,((abs(x)-51)/13)^2+(y/13)^2-1,max(abs(x)-51,y))),abs(x/51+10/51*sin(abs(y/61.2)^(1.2)*pi*(7/2)))^(2/3)+abs(y/61.2)^(2/3)-1) *
min(1-(x/32)^2-((y+30)/32)^2,1-((abs(x)+5)/22)^2-((y-18)/22)^2) *
min(1-((abs(x)-18)/20)^2-((y+10)/20)^2,((abs(x)-20)/22)^2+((y+7)/20)^2-1) *
(1-((abs(x)-51)/11)^2-(y/11)^2)
}
x <- seq(-150, 150, length=400)
z <- outer(x,x, Vectorize(jibanyan_equation))
@tsubaki
tsubaki / SingletonMonoBehaviourFast.cs
Last active March 14, 2022 06:06
少しだけ高速なシングルトン。初回検索を特定のタグから行う事で少しだけ高速化(倍〜3倍)。awakeフェイズ以降に呼び出す場合は以前と余り変わらず。
using UnityEngine;
using System;
using System.Collections;
public abstract class SingletonMonoBehaviourFast<T> : MonoBehaviour where T : SingletonMonoBehaviourFast<T>
{
protected static readonly string[] findTags =
{
"GameController",
};
@benui-dev
benui-dev / OrderTester.cs
Created May 17, 2013 06:29
Unity order tester. Comment out lines you don't care about. Update etc. will be especially noisy.
using UnityEngine;
using System.Collections;
public class OrderTester : MonoBehaviour {
void Update() { Debug.Log("Update()"); }
void LateUpdate() { Debug.Log("LateUpdate()"); }
void FixedUpdate() { Debug.Log("FixedUpdate()"); }
void Awake() { Debug.Log("Awake()"); }
void Start() { Debug.Log("Start()"); }
void Reset() { Debug.Log("Reset()"); }
@ShinichiU
ShinichiU / redmine-2-2-1-gantt.patch
Last active April 5, 2016 11:59
Redmine 2.2.1 のガントチャートに週表示を消して日付表示にするバッチ
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 0cebd0a..af74a18 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -43,12 +43,17 @@
headers_height = header_height
show_weeks = false
+ show_week_day_top = false
show_days = false