Skip to content

Instantly share code, notes, and snippets.

View gmodeblog's full-sized avatar

G-MODE Blog gmodeblog

View GitHub Profile
$ docker-compose up
# dbコンテナ起動
$ docker run -d \
--name gchat_db_1 \
-p 27017:27017 \
mongo mongod --smallfiles
# appコンテナ起動
$ docker run -d \
--name gchat_web_1 \
--link db:db \
$ git clone https://github.com/gmodecorp/gchat
$ cd gchat
$ ifconfig
docker0 Link encap:Ethernet HWaddr 56:84:7A:FE:97:99
inet addr:172.17.42.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::5484:7aff:fefe:9799/64 Scope:Link
......
$ sudo yum install docker
$ boot2docker ip
NSLog(@"title: %@", [curItem valueForProperty:MPMediaItemPropertyTitle]
const int SAMPLE_NUM = 512;
LineRenderer line;
line = gameObject.AddComponent<LineRenderer>();
//好きな色を指定しています。
line.material.color = Color.cyan;
//ちょうどいい太さを指定しています。
line.SetWidth(0.065f, 0.065f);
line.SetVertexCount(SAMPLE_NUM);
float[] audioWaveFloat = new float[SAMPLE_NUM];
audioWaveFloat = extraAudioSource.audio.GetSpectrumData(SAMPLE_NUM, 0, FFTWindow.BlackmanHarris);
AudioSource extraAudioSource;
WWW wwwFile;
wwwFile = new WWW("file://" + Application.persistentDataPath + valueForProperty:MPMediaItemPropertyTitle + ".wav");
extraAudioSource.clip = wwwFile.GetAudioClip(false, false, AudioType.WAV);
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:outPath])
{
[fileManager removeItemAtURL:outURL error:nil];
}