Skip to content

Instantly share code, notes, and snippets.

@masayuki5160
masayuki5160 / Chat.cs
Last active October 12, 2015 12:09
サーバサイドPHP, クライアントUnityで検証
using UnityEngine;
using System.Collections;
using WebSocketSharp;
using System.Collections.Generic;
public class Chat : MonoBehaviour {
// Use this for initialization
void Start () {
Connect();
@masayuki5160
masayuki5160 / PHP54をEC2にいれる
Created October 12, 2015 01:39
EC2にPHP5.4をいれるときのメモ
- httpd24いれとかんとだめらしい. なんでかはしらべてない.
yum install httpd24 php54
@masayuki5160
masayuki5160 / RDS,EC2でレプリケーションをする.txt
Created September 17, 2015 12:21
RDS,EC2でレプリケーションをする
------------------------------------
RDS,EC2でレプリケーションをする
------------------------------------
RDSがマスター, EC2を参照系としてサーバを構築する際のメモ
注意点は、
・mysqlサーバのバージョンをあわせること
・RDS、EC2のtimezoneをあわせること => RDSはデフォルトUTCなのでそこを設定
@masayuki5160
masayuki5160 / input.txt
Last active August 29, 2015 14:20
AWS EMR動作テスト
one two two three three
three four four four four
@masayuki5160
masayuki5160 / memo
Created May 3, 2015 11:38
Python + EMR
Python + Hive on AWS EMR で貧者のログサマリ
http://sssslide.com/www.slideshare.net/akirachiku/python-hive-on-emr
Amazon EMR編~ElasticMapReduceの使い方
http://recipe.kc-cloud.jp/archives/1145
http://recipe.kc-cloud.jp/archives/1152
http://recipe.kc-cloud.jp/archives/1209
@masayuki5160
masayuki5160 / access_log.201505030516
Last active August 29, 2015 14:20
Python + Kinesis
{"date": "2015-05-03 10:36:43", "result": "106.179.89.159 - - [03/May/2015:10:36:43 +0000] \"GET / HTTP/1.1\" 403 3839 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36\"\n"}
{"date": "2015-05-03 10:36:43", "result": "106.179.89.159 - - [03/May/2015:10:36:43 +0000] \"GET /icons/apache_pb2.gif HTTP/1.1\" 304 - \"http://52.68.97.208/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36\"\n"}
{"date": "2015-05-03 10:36:44", "result": "106.179.89.159 - - [03/May/2015:10:36:44 +0000] \"GET / HTTP/1.1\" 403 3839 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36\"\n"}
{"date": "2015-05-03 10:36:44", "result": "106.179.89.159 - - [03/May/2015:10:36:44 +0000] \"GET /icons/apache_pb2.gif HTTP/1.1\" 304 - \"http://52.68.97.208/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/
@masayuki5160
masayuki5160 / composer.json
Last active August 29, 2015 14:18
AWS Kinesisを使うまで
{
"require":{
"aws/aws-sdk-php":"2.*"
}
}
@masayuki5160
masayuki5160 / app.js
Last active August 29, 2015 14:17
EC2でnode.js, socket.ioのテスト
var app = require('http').createServer(handler),
io = require('socket.io').listen(app),
fs = require('fs');
app.listen(3000);
io.set('log level', 1);
function handler(req, res) {
fs.readFile(__dirname + '/index.html', function(err, data) {
if (err) {
res.writeHead(500);
return res.end('Error');
@masayuki5160
masayuki5160 / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@masayuki5160
masayuki5160 / DockerTest
Last active August 29, 2015 14:11
AWSでDockerをためしてみる
1. まずはDockeをインストール
$ sudo yum install -y docker
2. Dockerのデーモンをスタート
$ sudo service docker start
3. Docker 公式サイトで提供されているチュートリアル用のコンテナを取得
$ sudo docker pull learn/tutorial
--------------------------------------------------