Skip to content

Instantly share code, notes, and snippets.

View hatappo's full-sized avatar
🦙

fumihiko hata hatappo

🦙
  • Tokyo Japan
  • 19:12 (UTC +09:00)
View GitHub Profile
@hatappo
hatappo / Gemfile
Created February 2, 2023 08:39
Parse AWS Invoice PDF file and extract the exchange rate value.
# frozen_string_literal: true
source "https://rubygems.org"
gem "pdf-reader"
@hatappo
hatappo / ReNameOfindXargs.sh
Last active November 18, 2021 16:04 — forked from 544/ReNameOfindXargs.sh
findとxargsでファイル名変更、そしてファイル名を戻す。
# カレントディレクトリ直下のマークダウンのファイルすべてに対して、ファイル名の末尾に '.org' を付与する
find ./ -type f -maxdepth 1 -name "*.md" | xargs -I% mv % %.org
# 上とまったく逆の操作。 末尾の '.org' を取り除く。
find ./ -type f -maxdepth 1 -name "*.md.ignore" | sed 's/\.ignore$//' | xargs -I% mv %.org %
# いったん、ファイル名を退避して、ことが終わったらもとに戻す、とかのときに便利。

Keybase proof

I hereby claim:

  • I am hatappo on github.
  • I am hatappo (https://keybase.io/hatappo) on keybase.
  • I have a public key whose fingerprint is 9067 C31C 8837 6D07 49C1 5AB8 8CEF A95B 3C12 2BC2

To claim this, I am signing this object:

Overview
We have heard from Amazon Chime SDK customers since our launch in 2019 that they need messaging features in their applications. Telehealth customers want to enable real-time and asynchronous communication between care providers and patients. Live event hosts want participants to discuss content in real-time over messaging while they watch a video stream. Services that host virtual trade shows want to use messaging to connect conference attendees to experts in virtual booths.
In response, we have built messaging into the Amazon Chime SDK. However, we have designed messaging in the Amazon Chime SDK to be more than just basic chat. Customers with chat use cases can create experiences that also connect communities of users through channels. Customers can create channels for scenarios that include 1-to-few members, or create channels with up to 100,000 members. Customers can also build real-time collaboration features that enable multiple users to view and update applications at the same time, using the
@hatappo
hatappo / blog.ja.txt
Last active September 14, 2021 16:04
Amazon Chime SDK for Messagingを使ってアプリケーションにチャット機能を組み込む方法 https://aws.amazon.com/jp/blogs/news/build-chat-features-into-your-application-with-amazon-chime-sdk-messaging-jpmne/
概要
2019年の発表以来、Amazon Chime SDKのお客様からアプリケーションにメッセージング機能が必要であるという要望が多く寄せられてきました。テレヘルス(遠隔医療)のお客様は、ケアプロバイダーと患者間のリアルタイムおよび非同期のコミュニケーションを可能にしたいと考えています。ライブイベントの主催者は参加者がビデオストリームを見ながらメッセージングでリアルタイムにコンテンツについて議論したいと考えています。バーチャルな展示会を開催するサービスでは、メッセージングを使って会議の参加者とバーチャルなブースにいる専門家を結びつけたいと考えています。
そこで、私たちはAmazon Chime SDKにメッセージング機能を組み込みました。Amazon Chime SDKのメッセージングは、単なる基本的なチャット以上のものになるように設計されています。チャットのユースケースをお持ちのお客様は、チャネルを通じてユーザーのコミュニティをつなぐ体験を作ることができます。お客様は1人から数人のメンバーを含むシナリオ用のチャネルを作成したり、最大10万人のメンバーを含むチャネルを作成したりすることができます。また、Amazon Chime SDK for Messagingを使用して、複数のユーザーが同時にアプリケーションを表示・更新できるリアルタイムコラボレーション機能を構築し、各ユーザーの表示間で一貫した状態を維持することができます。現在、モバイルワーカー支援サービスを提供するPlayerLync社のようなお客様が職場での学習やコラボレーションを可能にするためにメッセージングを利用しています。
PlayerLync社のChief Technology OfficerであるGreg Menard氏は次のように話をいただいています。「PlayerLync社はStarbucks社、Crocs社、Southern Company Gas社などのお客様に、トレーニング、学習、コラボレーションをより効率的に行うためのオールインワンソリューションを提供しています。Amazon Chime SDKを選んだのは、既存のサービスに新規のコミュニケーション機能を追加するにあたり、既存のユーザーエクスペリエンスの中で、機能追加をコントロールすることが可能だったからです。また、AWSのセキュリティとスケーラビリティを提供し、使い慣れたAWS
@hatappo
hatappo / index.js
Created September 8, 2021 10:07
String の SHA-1 ハッシュ値を計算し、その ArrayBuffer を16進数(HEX)に変換する。
const buf2hex = arrayBuffer => {
return [...new Uint8Array(arrayBuffer)]
.map(x => x.toString(16).padStart(2, '0')).join('');
}
const text = `あいうえお`;
const data = new TextEncoder().encode(text);
const digest = await crypto.subtle.digest("SHA-1", data);
console.log(digest);
//=> ArrayBuffer(20)
@hatappo
hatappo / S3-Bucket-CORS.json
Created August 31, 2021 10:43
Browser にクリデンシャルを直接渡して S3 からオブジェクトのデータを取得する、危険なサンプル
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"HEAD"
],
"AllowedOrigins": [
@hatappo
hatappo / sample.go
Created July 14, 2021 18:34
Golang で enum をどう実装するか
package main
import (
"fmt"
enum "github.com/hatappo/go-skelton/main/enum"
)
func main() {
hoge := enum.SeasonValueOf("ほげ")
@hatappo
hatappo / stack.yml
Last active June 27, 2021 05:57
https://hub.docker.com/_/ghost/ の docker-compose.yaml あれこれ
# by default, the Ghost image will use SQLite (and thus requires no separate database container)
# we have used MySQL here merely for demonstration purposes (especially environment-variable-based configuration)
version: '3.1'
services:
ghost:
image: ghost:3-alpine
platform: linux/amd64
@hatappo
hatappo / index.md
Last active June 18, 2021 13:29
VScode による mermaid.js を使ったシーケンス図作成のサンプル