Skip to content

Instantly share code, notes, and snippets.

AWS EC2 Debianにおいて、EBS拡張を実施

AWSコンソールからボリュームの拡張を実施

ssh接続し、以下を実行

# パーティション拡張するための[growpart]使用のため、[cloud-guest-utils]をインストール
sudo apt install cloud-guest-utils
# パーティションの一覧を表示
@falco694
falco694 / hello_lastpass.py
Last active September 24, 2019 14:38
get lastpass data.
# -*- coding: utf-8 -*-
""" get lastpass data.
1. install python library.
- pip install boto3 lastpass-python
- pipenv install boto3 lastpass-python
"""
import boto3
@falco694
falco694 / get_ebs_snapshots_no_ami.py
Created September 17, 2019 02:18
AMIが存在しないEBSスナップショットを出力
# %%
import boto3
client = boto3.client("ec2")
def main():
response = client.describe_snapshots(
OwnerIds=[
get_account_id(),
],
@falco694
falco694 / stream_webcam.html
Created July 3, 2019 06:17
ウェブカメラの映像と音声を出力します
<video id="video" width="640" height="480" autoplay></video>
<script>
var video = document.getElementById("video");
var media = navigator.mediaDevices.getUserMedia({
video: true,
audio: true,
});
media.then((stream) => {
video.srcObject = stream;
});
@falco694
falco694 / captcha.py
Created June 8, 2019 17:30
Webカメラの映像表示
#!/usr/bin/python
#coding: utf-8
import cv2
def main():
#Webカメラの映像表示
capture = cv2.VideoCapture(0)
if capture.isOpened() is False:
raise("IO Error")