マイコンに ATMega32u4 を、USB コネクタに Type-C を使った左右分割型キーボードを設計するために必要となりそうな知識をメモ。
なお、ケースが金属製か否かで静電気対策が変わってくる(はず)。
マイコンの電源は、マスター側の場合はUSB ケーブルで供給し、スレーブ側の場合は TRRS ケーブルで供給する。
| #include <M5Atom.h> | |
| #include "BrownieClient.h" | |
| #define PIN_DOUT 32 | |
| #define PIN_SLK 26 | |
| #define MEDIAN_FILTER_SIZE 10 | |
| static char ssid[64] = "your-ssid"; | |
| static char pass[64] = "your-password"; | |
| static char mqtt[64] = "192.168.xx.xx"; |
| #include <M5Atom.h> | |
| #include <BLEDevice.h> | |
| // Contact Tracing Bluetooth Specification (Apple/Google) | |
| // https://blog.google/documents/58/Contact_Tracing_-_Bluetooth_Specification_v1.1_RYGZbKW.pdf | |
| const char* uuid = "0000fd6f-0000-1000-8000-00805f9b34fb"; | |
| bool found = false; | |
| class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks { | |
| void onResult(BLEAdvertisedDevice advertisedDevice) { |
| # 実行例 | |
| 電気 | |
| => 電気 | |
| 照明 | |
| => 電気 | |
| トイレ | |
| => 台所 | |
| パソコン | |
| => テレビ |
Mastodon が他のインスタンスと情報交換をする OStatus API の使い方。使ってるだけのユーザは知る必要がない裏側の話。
Mastodon インスタンスに対して、RFC6415 が規定する /.well-known/host-meta というパスを要求すると以下の XML が返ってくる.
<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Link rel="lrdd" type="application/xrd+xml" template="https://[MASTODON_HOST]/.well-known/webfinger?resource={uri}"/>
</XRD>| #!/bin/bash | |
| eval `docker-machine env default` | |
| processes=`docker ps -q -f status=exited` | |
| if [ -n "$processes" ]; then | |
| docker rm $processes | |
| fi | |
| images=`docker images -q -f dangling=true` | |
| if [ -n "$images" ]; then |
シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ
NSObjectのサブクラスを定義するスコープとdynamicの有無によるKVC/KVO挙動の違い
ファイルスコープはNSObjectではなく、そのサブクラスをサブクラス化してるような挙動。
Go 1.4 RC1が出たのでまとめ
原文: http://tip.golang.org/doc/go1.4
go コマンドにいくつかツールが追加されたよ