Skip to content

Instantly share code, notes, and snippets.

View taka328w's full-sized avatar

Takahiro Ooishi taka328w

  • mitsubachiworks inc.
View GitHub Profile
@taka328w
taka328w / gist:2357524
Created April 11, 2012 07:18
コーディング規約の補足
// ■変数宣言
// 1. *の前にスペース。後には入れない
// 2. 代入演算子の前後にスペース
NSString *string = [[NSString alloc] initWithString:@"string"];
NSString* string = [[NSString alloc] initWithString:@"string"];
@taka328w
taka328w / gist:1615946
Created January 15, 2012 14:02
/etc/hosts生成
# coding: utf-8
require 'rubygems'
require 'aws-sdk'
config = {:access_key_id => 'アクセスキー ID',
:secret_access_key => 'シークレットアクセスキー'}
AWS.config(config)
hosts = []
hosts << "127.0.0.1\tlocalhost localhost.localdomain"
@taka328w
taka328w / gist:1615935
Created January 15, 2012 13:58
EC2インスタンス生成
# coding: utf-8
require 'rubygems'
require 'aws-sdk'
require 'net/ssh'
config = {:access_key_id => 'アクセスキー ID',
:secret_access_key => 'シークレットアクセスキー'}
AWS.config(config)
ec2 = AWS::EC2.new