Skip to content

Instantly share code, notes, and snippets.

View step5748's full-sized avatar

mori-kazuki step5748

  • none
  • Japan
View GitHub Profile

#Atomの設定をsync-settingsを用いて共有する方法

@step5748
step5748 / K-9Mail
Last active August 29, 2015 14:19
Windows Live Mail をK-9 Mailクライアントを使用して送受信するための設定です。
〇受信(POP3)
受信サーバー : pop3.live.com
ポート番号 : 995
保護された接続 : SSL/TLS を使用する。
アカウント名 : Liveメール(Hotmailメール)のアカウント名
パスワード : Liveメール(Hotmailメール)のパスワード
〇送信(SMTP)
送信サーバー : smtp.live.com
ポート番号 : 587
@step5748
step5748 / defaultArgs.cpp
Last active August 29, 2015 14:19
【C++】デフォルト実引数のコンパイルエラーチェック
void funcA( int a, int b = 1 ); // OK
void funcB( int a = 1, int b ); // NG!
void funcC( int a, int b = 3 ); // OK
void funcC( int a = 4, int b ); // OK bは3となる。
void funcC( int a, int b = 5 ); // NG!デフォルト実引数の変更はできない。
@step5748
step5748 / unity_AddDeleteComponent.cs
Last active August 29, 2015 14:19
【Unity】コンポーネントの追加と削除
// コンポーネントの追加
BoxCollider box = gameObject.AddComponent<BoxCollider>();
// コンポーネントの削除
Destroy(box);
@step5748
step5748 / DeepCopySample01.cs
Last active August 29, 2015 14:19
DeepCopy.csの使い方
// コピーしたいテストクラス
[System.Serializable]
public class item
{
public int id;
public string name;
}
@step5748
step5748 / DeepCopy.cs
Last active August 29, 2015 14:19
C#によるシリアライズを利用した汎用のオブジェクトのディープコピー処理
//===========================================================================
//!
//! @file DeepCopy.cs
//! @brief シリアライズを利用した汎用のオブジェクトのディープコピー処理
//!
//! @note
//! BinaryFormatterを使用してMemoryStreamに対してシリアライズ/デシリアライズを行い
//! オブジェクトのメモリイメージのコピーを作成するテクニックです。
//! 理論上、Serializable属性を付与したすべてのオブジェクトに対してディープコピーが可能になります。
//!
@step5748
step5748 / github-blog-post.js
Last active August 29, 2015 14:19
Github ブログへの埋め込みサンプル
<script src="http://gist-it.appspot.com/github/step5748/example/blob/master/test-gist-it.js"></script>
@step5748
step5748 / main.c
Last active August 29, 2015 14:19
Gist投稿テスト
int main(void)
{
return 0;
}