Skip to content

Instantly share code, notes, and snippets.

View iktakahiro's full-sized avatar

Takahiro Ikeuchi iktakahiro

View GitHub Profile
@iktakahiro
iktakahiro / file0.txt
Created September 10, 2013 01:38
historyコマンドで行数表示しない ref: http://qiita.com/iktakahiro/items/c864cda6ce67d3047edc
# 当然あるだろうと思いきや実はなかったのでメモ
# historyからコマンド履歴のコピペ再利用がし易くなる
history |cut -f6- -d " "
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'Takahiro Ikeuchi'
import sys
import re
def main():
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'Takahiro Ikeuchi'
import sys
import re
from collections import defaultdict
/usr/sbin/logrotate -fd /etc/logrotate.d/nginx
@iktakahiro
iktakahiro / file0.txt
Created January 21, 2014 12:42
wkhtmltopdf でHTMLをPDF化する際の良い感じのオプション ref: http://qiita.com/iktakahiro/items/a9d993ddfdbc3404deba
# ヘッダ右側に日付、フッタ中央にページ番号、マージンを調整
/usr/local/bin/wkhtmltopdf \
--print-media-type \
--header-right [date] \
--header-spacing 2 \
--footer-center [page]/[topage] \
--footer-spacing 2 \
--margin-top 12 \
--margin-right 5 \
./sphinx-quickstart.expect hoge_dir project_hoge
@iktakahiro
iktakahiro / file0.txt
Created June 4, 2014 13:31
cURL(curlコマンド)でHipChatにメッセージを送る ref: http://qiita.com/iktakahiro/items/e431ca97f368832e6feb
!/bin/bash
BASE_URI="https://api.hipchat.com"
API_VERSION="v1"
# Notification権限を持つAPIトークンを記載します
API_TOKEN=****************
COMMON_URI=${BASE_URI}/${API_VERSION}
COMMON_PARAMETER="format=json&auth_token=${API_TOKEN}"
# home brewをインストールし、caskを有効にします。
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
# brew caskを利用してアプリケーションをインストールします。
@iktakahiro
iktakahiro / file0.txt
Created May 14, 2015 09:55
AWS EC2 リザーブドインスタンスの購入検討に役立ちそうなワンライナー(途中) ref: http://qiita.com/iktakahiro/items/4c9cd0452a7edea6d9b0
$ aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | select(.State.Name == "running") | [.InstanceId, .InstanceType, .Placement.AvailabilityZone, .Tags[].Value] |@csv '

このドキュメントについて

PyCon JP 2015 チュートリアル『Python x Edison x AWSではじめる IoT』に参加する方向けのドキュメントです。

当日の持ち物

Mac OS または Windows(64bit)のインストールされたノートPCをお持ち下さい。Mac と Windows PCの両方をお持ちの方は Mac の持参をお薦めいたします。PC は、USBポートを最低1つ備えている必要があります。

事前準備