Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
public class testLoad : MonoBehaviour {
private string prefabName = "test0001";
// Use this for initialization
void Start () {
GameObject prefab = Resources.Load(prefabName) as GameObject;
@masayuki5160
masayuki5160 / sample.cs
Created February 5, 2014 03:48
親子関係になってるオブジェクトの取得
// 子
GameObject child = gameObject.transform.FindChild("GameObjectChild").gameObject;
// 孫
GameObject grandSon = gameObject.transform.Find("GameObjectChild/GameObjectGrandSon").gameObject;
@masayuki5160
masayuki5160 / KiiCloudManager.cs
Created February 25, 2014 14:31
Kii Cloud検証中なう。
using UnityEngine;
using System.Collections;
using KiiCorp.Cloud.Storage;
using KiiCorp.Cloud.Analytics;
public class KiiCloudManager : MonoBehaviour {
void Awake()
{
string deviceID = SystemInfo.deviceUniqueIdentifier;
@masayuki5160
masayuki5160 / fluentdTest
Created March 18, 2014 09:14
fuentdの設定作成なう
<source>
type tail
tag apache.access
format apache
path /var/log/httpd/access_log
pos_file /var/log/httpd/access_log
</source>
<match apache.access>
type s3
@masayuki5160
masayuki5160 / BaseFormation.template
Created March 25, 2014 17:08
Base VPC Formation.
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"vpc626b7500": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"InstanceTenancy": "default",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true"
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Base VPC Template.",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyAWS::CloudFormation::InitPair to enable SSH access to the instances",
"Type": "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern": "[-_ a-zA-Z0-9]*",
@masayuki5160
masayuki5160 / Install_td-agent
Last active August 29, 2015 13:57
EC2でtd-agentの導入テスト(ひとまずローカルにtd-agentであつめたログを再格納しているだけ..)
※EC2は構築済み
1. apacheいれる
# sudo yum update -y
# sudo yum install httpd -y
# sudo /etc/init.d/httpd start
2. td-agentの導入〜起動まで
@masayuki5160
masayuki5160 / access_log.sql
Last active August 29, 2015 13:57
td-agentのconf. aggregaterでうまくひとまず収集するところまで.
CREATE DATABASE APP_LOG CHARACTER SET utf8;
create table if not exists access_log (
id int(10) NOT NULL AUTO_INCREMENT,
code int(10) NOT NULL,
path varchar(255) NOT NULL,
agent varchar(255) NOT NULL,
referer varchar(255) NOT NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@masayuki5160
masayuki5160 / ServerTrainingVPC.template
Created April 8, 2014 00:28
ServerTraining用のCloudFormationテンプレート
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Base VPC Template.",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyAWS::CloudFormation::InitPair to enable SSH access to the instances",
"Type": "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern": "[-_ a-zA-Z0-9]*",
@masayuki5160
masayuki5160 / FirstSQLite.cs
Created April 14, 2014 02:55
SQLiteKit usage example.
using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Text;
using System.Threading;
using System.Diagnostics;
public class FirstSQLite : MonoBehaviour {