Skip to content

Instantly share code, notes, and snippets.

@ytsuboi
ytsuboi / Wio_Terminal_GPS_Left.ino
Created May 16, 2020 16:10
A sample code to use Grove - GPS on left side Grove connector of Wio Terminal.
#include <TinyGPS++.h>
#include <wiring_private.h>
static const uint32_t GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device - Left side Grove connector.
// Left side Grove connector shares pins with I2C1 of 40 pin connector.
@ytsuboi
ytsuboi / mbed_app.json
Created May 10, 2019 02:13
mbed-os-example-cellularをGoogle Fiで実行した
{
"config": {
"sock-type": "TCP",
"echo-server-hostname": {
"help": "Echo server host name.",
"value": "\"echo.mbedcloudtesting.com\""
},
"echo-server-port": {
"help": "Echo server port number.",
"value": 7
@ytsuboi
ytsuboi / mbed_app.json
Created May 9, 2019 20:55
mbed-os-example-cellularをT-MobileのNB-IoT SIMで実行した
{
"config": {
"sock-type": "TCP",
"echo-server-hostname": {
"help": "Echo server host name.",
"value": "\"echo.mbedcloudtesting.com\""
},
"echo-server-port": {
"help": "Echo server port number.",
"value": 7
@ytsuboi
ytsuboi / mbed_app.json
Last active May 15, 2019 11:56
mbed-os-example-cellularをSORACOMのKM1で実行したときの設定
{
"config": {
"sock-type": "TCP",
"echo-server-hostname": {
"help": "Echo server host name.",
"value": "\"echo.mbedcloudtesting.com\""
},
"echo-server-port": {
"help": "Echo server port number.",
"value": 7
@ytsuboi
ytsuboi / ifttt_webhook_by_int.ino
Last active January 24, 2018 06:25
Send notification through IFTTT when Wio LTE get interrupt from GPIO
#include <WioLTEforArduino.h>
#include <stdio.h>
#define APN "soracom.io"
#define USERNAME "sora"
#define PASSWORD "sora"
#define WEBHOOK_EVENTNAME "ENTER_YOUR_WEBHOOK_EVENTNAME_HERE"
#define WEBHOOK_KEY "ENTER_YOUR_WEBHOOK_KEY_HERE"
#define WEBHOOK_URL "https://maker.ifttt.com/trigger/"WEBHOOK_EVENTNAME"/with/key/"WEBHOOK_KEY
@ytsuboi
ytsuboi / microbit-8-Ultrasonic-Meter.hex
Created August 24, 2017 13:52
The hex file of Grove Inventor Kit for micro:bit Tutorial 8
:020000040000FA
:10000000C0070000D1060000D1000000B1060000CA
:1000100000000000000000000000000000000000E0
:100020000000000000000000000000005107000078
:100030000000000000000000DB000000E500000000
:10004000EF000000F9000000030100000D010000B6
:1000500017010000210100002B0100003501000004
:100060003F01000049010000530100005D01000054
:1000700067010000710100007B01000085010000A4
:100080008F01000099010000A3010000AD010000F4
@ytsuboi
ytsuboi / 2fa-cli.md
Last active July 2, 2021 05:26
GitHubの2段階認証を有効にした状態で、repositoryの操作をコマンドラインで行うためのメモ

二段階認証を有効にする方法

2段階認証を有効にする方法は適当にググってください。 たしか、ログインした状態で、右上のアイコンの右にある▼をクリック、Settings→Securityに「Two-factor authentication」という設定項目があるはずです。 Google Authenticatorなどの、RFC 6238 Time-Based One-Time Password Algorithmを搭載したトークン発生器を用意しておいてください。

ただし、二段階認証を有効にすると、コマンドラインでgit cloneしたり、push、pullなどの操作を行おうとすると、認証で蹴られるようになります。

二段階認証を有効にした場合のgitコマンドでの操作

二段階認証を有効にしたら、GitHubのウェブで、Personal Access Tokenを取得して、これを使います。 GitHubのCreating an access token for command-line useに書いてありますが、二段階認証を有効にしたときと同じく、ログインした状態で右上のアイコンの右にある▼をクリックし、「Personal access tokens」という項目でトークンの発行が可能です。

@ytsuboi
ytsuboi / cpuinfo
Created January 9, 2016 07:13
HiKey
linaro@linaro-developer:~$ cat /proc/cpuinfo
Processor : AArch64 Processor rev 3 (aarch64)
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
@ytsuboi
ytsuboi / cpuinfo
Last active January 7, 2016 13:41
DragonBoard 410c
processor : 0
Features : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 0
processor : 1
Features : fp asimd evtstrm crc32
@ytsuboi
ytsuboi / Eddystone_main.c
Last active November 3, 2015 10:57
Eddystone-URL on PRoC BLE module sample code.
/*
* Eddystone on PRoC BLE module sample code.
* ytsuboi Switch Science
*
* These codes are licensed under CC0.
* http://creativecommons.org/publicdomain/zero/1.0/deed.ja
*/
#include <project.h>