プログラミングErlangJoe Armstrong オーム社 Amazon.co.jpで詳細
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using System.Text.RegularExpressions; | |
using System.Reflection; | |
public class UnityKeyRemapEditor : EditorWindow | |
{ | |
// オブジェクトの共通Openコマンド | |
[MenuItem("KeyRemap/Open &o")] | |
static void KeyRemapOpen() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start () { | |
StartCoroutine("Coroutine1"); | |
} | |
void Update () { | |
Debug.Log ("Update."); | |
} | |
public IEnumerator Coroutine1() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<AnimationClip> GetAnimationClipInFbx(string iFbxFileName) | |
{ | |
// 現在のLoad中のAnimationClipをUnloadし、何もLoadしていない状態にする | |
Resources.FindObjectsOfTypeAll<AnimationClip>().ToList().ForEach(x => Resources.UnloadAsset(x)); | |
// AnimationClipを取り出したいFbxファイルをLoadする | |
string aFbxFilePath = Application.dataPath + "/Resources/Models/" + iFbxFileName; | |
aFbxFilePath = aFbxFilePath.Replace(".fbx", "").Replace("\\", "/"); | |
Resources.LoadAll(aFbxFilePath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# シンタックスチェック | |
/usr/bin/mcs -r:/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll,/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll,~/projects/proj1/Library/ScriptAssemblies/Assembly-CSharp.dll,~/projects/proj1/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll $1 -target:library | |
dll_file=`echo $1 | sed -e "s/\.cs/.dll/"` | |
ls ${dll_file} && rm ${dll_file} | |
# コードスタイルチェック | |
/usr/bin/mono ~/.emacs.d/bin/StyleCopCLI.exe -cs $PWD/$1 -out /tmp/stylecop.log | |
# エラーとして扱いたくないものは、grepに追加していく |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun elscreen-swap-previous() | |
"Interchange screens selected currently and previous." | |
(interactive) | |
(cond | |
((elscreen-one-screen-p) | |
(elscreen-message "There is only one screen, cannot swap")) | |
(t | |
(let* ((screen-list (sort (elscreen-get-screen-list) '>)) | |
(previous-screen | |
(or (nth 1 (memq (elscreen-get-current-screen) screen-list)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# %{%B%}...%{%b%}: 「...」を太字にする。 | |
# %K{red}...%{%k%}: 「...」を赤の背景色にする。 | |
# %{%F{cyan}%}...%{%f%}: 「...」をシアン色の文字にする。 | |
# %n: ユーザ名 | |
# %?: 最後に実行したコマンドの終了ステータス | |
# %(x.true-text.false-text): xが真のときはtrue-textになり | |
# 偽のときはfalse-textになる。 | |
PROMPT_HOST='%{%b%F{gray}%K{blue}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{black}%} %n %{%F{blue}%}' | |
PROMPT_DIR='%{%F{black}%} %~% ' | |
PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}⮀%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k%F{magenta}%})⮀%{%f%k%b%}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; screenを定位置に設定する | |
(setq elscreen-custom-screen-alist | |
'((0 . "Folder") | |
(1 . "*twittering*") | |
(2 . "todo.org") | |
(3 . "*scratch*") | |
(4 . "*scratch*") | |
(5 . "*scratch*") | |
(6 . "*scratch*") | |
(7 . "*scratch*") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; iOS SDKへのPATH | |
(defvar xcode:sdk "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk") | |
;; TABスペースは利用せず、半角スペースを4つにする(デフォルトのままでは2になってました) | |
(add-hook 'objc-mode-hook | |
'(lambda() | |
(setq c-basic-offset 4) | |
(setq tab-width 4) | |
(setq indent-tabs-mode nil))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hoge(object): | |
def function1(self, args): | |
return args | |
def function2(self, args): | |
return args + 50 |
OlderNewer