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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
opener = urllib2.build_opener(urllib2.HTTPHandler) | |
request = urllib2.Request('http://example.com', data='your_put_data') | |
request.add_header('Content-Type', 'your/contenttype') | |
request.get_method = lambda: 'OPTIONS' | |
url = opener.open(request) |
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
$ pip install apache-libcloud |
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
$ cd ~/gce_ansible | |
$ ./play.sh master.yml | |
PLAY [Create new GCE instances] ****************** | |
...(略)... | |
TASK: [Create LoadBalancer] ********************** | |
changed: [127.0.0.1] => {"changed": true, "external_ip": "107.167.187.229", ... | |
PLAY RECAP *************************************** |
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
$ go get github.com/curious-eyes/jmail |
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
{ | |
"packages": { | |
"zendframework/zend-expressive-skeleton": { | |
"dev-for-google-app-engine": { | |
"name": "zendframework/zend-expressive-skeleton", | |
"type": "project", | |
"version": "dev-for-google-app-engine", | |
"source": { | |
"url": "https://github.com/curious-eyes/zend-expressive-skeleton.git", | |
"type": "git", |
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
""" | |
Tkinter サンプル | |
""" | |
import tkinter | |
from datetime import datetime | |
from PIL import ImageTk | |
def get_imagename(): | |
""" ファイル名生成 """ |
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
""" tkinter.Frame 継承 | |
""" | |
import tkinter as tk | |
from PIL import ImageTk | |
class Application(tk.Frame): | |
""" メイン | |
同ディレクトリに cat01.png , cat02.png を配置する必要があります | |
$ pip install Pillow | |
も必要です |
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
def greeting(who): | |
print('Hello, ' + who) | |
def greetings(group): | |
for who in group: | |
print('Hello, ' + who) | |
if __name__ == '__main__': | |
me = 'Python' | |
greeting(me) |
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
# Install Docker ( "debian" 部分は Ubuntu の場合 "ubuntu" 置換する必要あり ) | |
sudo apt-get update | |
sudo apt-get -yy install apt-transport-https ca-certificates curl software-properties-common wget pwgen | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | |
sudo apt-get update && sudo apt-get -y install docker-ce | |
# Install Docker Compose | |
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |
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
sudo apt-get install libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev | |
sudo apt-get install libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev | |
sudo apt-get install libatlas-base-dev |
OlderNewer