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
#メモリ領域をマウントして使う | |
pi@raspberrypi:~/Code$ sudo cat /etc/fstab | |
proc /proc proc defaults 0 0 | |
/dev/mmcblk0p6 /boot vfat defaults 0 2 | |
/dev/mmcblk0p7 / ext4 defaults,noatime 0 1 | |
tmpfs /tmp/motion tmpfs defaults,noatime,size=20M 0 0 | |
# a swapfile is not a swap partition, no line here | |
# use dphys-swapfile swap[on|off] for that |
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
# Pythonのバージョン指定があったので、pyenvで入れてから以下の対応する | |
$ pyenv install 3.4.5 | |
$ pip install oauth2client | |
$ gcloud components update | |
--- | |
mba13:RaspberryPi aya$ gcloud auth application-default login | |
Your browser has been opened to visit: |
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
# -*- coding: utf-8 -*- | |
# | |
import re | |
import io | |
from datadog import initialize, api | |
import csv | |
options = { | |
'api_key': 'hogehoge', | |
'app_key': 'foobar' |
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
Datadog Agent | |
- ソフトウェア | |
- ソースコードはGithub | |
- プロキシーがある場合は設定が必要 | |
- オープンソース | |
- 開けておくべきポート: 17123/tcp, 17124/tcp, 8125/udp | |
要素 | |
- Collector: 一般的なシステムメトリックスを習得(CPUやメモリ、インテグレーション情報等) | |
- Dogstatsd: アプリケーションやコマンドラインスクリプトからカスタムメトリックスを送信するstatsdのサーバ | |
- Forwarder: 上記二点からデータを受け取りqueueの順番にしたがってDatadogに送信する |
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
import json | |
import urllib.request | |
request_data = {'name': 'User'} | |
request_url = 'https://my-api-id.execute-api.region-id.amazonaws.com/test/mydemoresource' | |
req = urllib.request.Request(request_url) | |
req.add_header('Content-Type', 'application/json; charset=utf-8') | |
jsondata = json.dumps(request_data) | |
jsondataasbytes = jsondata.encode('utf-8') | |
req.add_header('Content-Length', len(jsondataasbytes)) |
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
#cloud-config | |
apt_upgrade: true | |
apt_sources: | |
- source: "ppa:ansible/ansible" | |
packages: | |
- software-properties-common | |
- ansible | |
#!/bin/sh | |
DD_API_KEY={鍵情報こちらに} bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/install_agent.sh)" |
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
#!/bin/sh | |
sudo apt-get install software-properties-common | |
sudo apt-add-repository ppa:ansible/ansible | |
sudo apt-get update | |
sudo apt-get install ansible |
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
{ | |
"Version": "2012-10-17", | |
"Statement": { | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:StartInstances", | |
"ec2:StopInstances", | |
"ec2:RebootInstances", | |
"ec2:DescribeInstanceStatus", | |
"ec2:DescribeInstances", |
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
タイトル(仮) | |
わくわくドキドキITと一緒に振り返る恐竜(考古学?) | |
概要 | |
プログラミングから物理的な物を作るエンジニアの好奇心の元である子どもの頃夢中になった古生物(主に恐竜)について | |
それらの最新情報とそれを支えるIT技術について学び、技術がなし得る新しい一面を知るセッション | |
ターゲット | |
子どもの頃恐竜に夢中になっていた人、特にエンジニア | |
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
Social/Blog | |
- https://www.facebook.com/ayakomuro | |
- https://twitter.com/ayakomuro | |
- http://blog.popowa.com/ | |
Contact | |
- ayakomuro@gmail.com (private) | |
- komuro@serverworks.co.jp (work) | |
=========================== |