This file contains hidden or 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
--- | |
- hosts: all | |
tasks: | |
- name: install latest docker | |
shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh | |
- name: add vagrant user to docker group | |
command: gpasswd -a vagrant docker | |
sudo: yes |
This file contains hidden or 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
#vagrant provision [~/vagrant/ubunt1404] | |
==> default: Running provisioner: ansible... | |
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=/Users/masai/vagrant/ubunt1404/.vagrant/machines/default/virtualbox/private_key --user=vagrant --connection=ssh --limit='default' --inventory-file=/Users/masai/vagrant/ubunt1404/.vagrant/provisioners/ansible/inventory playbook.yml | |
PLAY [all] ******************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [default] | |
TASK: [install latest docker] ************************************************* |
This file contains hidden or 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
config.vm.provision "ansible" do |ansible| | |
ansible.playbook = "playbook.yml" | |
end |
This file contains hidden or 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
from bottle import route, run | |
# アノテーションでURLを記述 | |
@route('/deepapi/json/:name') | |
def hello(name): | |
return '<h1>Deep %s!</h1>' % name | |
# オプションをつけるとデバッグ実行 | |
run(host='masai-no-MacBook-Pro.local', port=8080, debug=True, reloader=True) | |
#run(host='localhost', port=8080) |
This file contains hidden or 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
# curl -L https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box > centos.box | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 280M 100 280M 0 0 2068k 0 0:02:18 0:02:18 --:--:-- 4524k | |
# ls | |
centos.box | |
# vagrant box add centos centos.box | |
==> box: Adding box 'centos' (v0) for provider: |
This file contains hidden or 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
#conding:utf-8 | |
import sys | |
import os | |
import urllib | |
import urllib2 | |
import json | |
import requests | |
KEY = '<Your Bing Developer Key>' |
This file contains hidden or 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
// NSLogの第一引数はフォーマット指定子 | |
NSLog(@"%@", [MixiSampleClass getStaticString]); | |
// インスタンス生成 | |
MixiSampleClass* obj = [[MixiSampleClass alloc]init]; | |
(void)[obj initWithName:@"abcdefg" sampleType:SampleTypePiyo]; | |
NSLog(@"%@", obj.name); | |
NSLog(@"%@", obj.name.addSample); |
This file contains hidden or 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
// | |
// NSString+SampleAddition.m | |
// TrainingObjectiveC | |
// | |
// Created by masai on 2015/06/10. | |
// Copyright (c) 2015年 masai. All rights reserved. | |
// | |
#import "NSString+SampleAddition.h" |
This file contains hidden or 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
// | |
// NSString+SampleAddition.h | |
// TrainingObjectiveC | |
// | |
// Created by masai on 2015/06/10. | |
// Copyright (c) 2015年 masai. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or 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
// | |
// MixiSampleClass.m | |
// TrainingObjectiveC | |
// | |
// Created by masai on 2015/06/09. | |
// Copyright (c) 2015年 masai. All rights reserved. | |
// | |
#import "MixiSampleClass.h" |