- 質問:AWSにEC2インスタンスを立てたことがある人?
- AWSのアカウント持ってない人はこの機会に取得してみよう
- クレカがない人は言ってください
- AWSにログインしてみよう https://portal.aws.amazon.com/
- 東京リージョンに変更してみよう
- Debian Jessieのインスタンスを起動してみよう
- Rubyビルド済みインスタンスを用意しました
- サイドバーのAMIから、検索欄に ami-53021a3d と書いて「パブリックイメージ」を選択
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#control flows | |
#br inside block -> forward jump | |
#br inside loop -> backward jump | |
#if | |
ret = nil | |
catch(:a) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/atsushi/prog/rutie/examples/rutie_ruby_example% bundle exec rake test | |
bundle install | |
Using rake 10.5.0 | |
Using ansi 1.5.0 | |
Using builder 3.2.3 | |
Using bundler 2.0.2 | |
Using minitest 5.11.3 | |
Using ruby-progressbar 1.10.1 | |
Using minitest-reporters 1.3.6 | |
Using color_pound_spec_reporter 0.0.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!php -d memory_limit=10G test.php | |
<?php | |
$a = []; | |
$total = 0; | |
$collision = 0; | |
for ($i = 0; $i < 100000000; $i++) { | |
$total += 1; | |
for ($j = 0; $j < 2; $j++) { |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execve("/root/torch/install/bin/th", ["th", "waifu2x.lua", "--help"], [/* 14 vars */]) = 0 | |
brk(0) = 0x7fb106960000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb105f57000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/root/torch/install/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/root/torch/install/lib/tls/x86_64", 0x7ffc979386c0) = -1 ENOENT (No such file or directory) | |
open("/root/torch/install/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/root/torch/install/lib/tls", 0x7ffc979386c0) = -1 ENOENT (No such file or directory) | |
open("/root/torch/install/lib/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bashを起動するときに読み込まれる設定ファイル | |
PATH=$PATH:$HOME/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host handson | |
User admin | |
Port 22 | |
IdentityFile インスタンスを作るときにダウンロードしたpemファイル | |
HostName パブリックIPアドレス | |
ServerAliveInterval 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/nginx.conf | |
http { | |
# http://www.xmisao.com/2014/05/09/fluentd-elasticsearch-nginx-log.html | |
log_format ltsv 'time:$time_iso8601\t' | |
'remote_addr:$remote_addr\t' | |
'request_method:$request_method\t' | |
'request_length:$request_length\t' | |
'request_uri:$request_uri\t' | |
'https:$https\t' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/sites-enabled/php.conf | |
server { | |
listen 80; | |
server_name php.aws; | |
root /var/www/html; | |
location / { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo vi /etc/systemd/system/rack-test.service | |
[Unit] | |
Description=rack-test | |
After=syslog.target | |
[Service] | |
User=admin | |
Group=admin | |
WorkingDirectory=/home/admin/rack-test | |
Environment=PATH=/usr/local/bin:/usr/bin:/bin:/home/admin/local/bin |
NewerOlder