今回使用したイメージはRaspian Lite 2018-03-13版。 まずEtcherを使ってイメージをmicroSDへ書き込む。
イメージ書き込み後、PCからmicroSDにあるconfig.txtを編集する。
※以下の行を末尾に追加する
dtoverlay=pi3-miniuart-bt
| $ irb -r time | |
| irb(main):001:0> Time.parse("2018-1-1 0:0:0.0") | |
| => 2018-01-01 00:00:00 +0900 | |
| irb(main):002:0> Time.parse("2018-1-1 0:0:0.0 UTC") | |
| => 2018-01-01 00:00:00 UTC | |
| irb(main):003:0> Time.parse("2018-1-1 0:0:0.0 UTC").localtime | |
| => 2018-01-01 09:00:00 +0900 |
今回使用したイメージはRaspian Lite 2018-03-13版。 まずEtcherを使ってイメージをmicroSDへ書き込む。
イメージ書き込み後、PCからmicroSDにあるconfig.txtを編集する。
※以下の行を末尾に追加する
dtoverlay=pi3-miniuart-bt
| // | |
| // mh-z14-calibration-test.pde | |
| // | |
| // see also... https://www.openhacks.com/uploadsproductos/mh-z14_co2.pdf | |
| // | |
| import processing.serial.*; | |
| byte [] buf = new byte[9]; | |
| Serial s = new Serial(this, "COM9", 9600); |
| #!/usr/bin/ruby | |
| def `(str) | |
| 'Wed Nov 29 12:34:56 JST 2017' | |
| end | |
| puts `date` |
| import numpy as np | |
| import cv2 | |
| import sys | |
| import os | |
| if (len(sys.argv)!=4): | |
| print("usage : {0} step_h overlap_h filename".format(sys.argv[0])) | |
| sys.exit() | |
| step_h = int(sys.argv[1]) |
| rem | |
| rem Androidでスクリーンショット撮影例.bat | |
| rem adbとImageMagickを使用 | |
| rem | |
| rem license: | |
| rem Copyright (c) 2017 yoggy <yoggy0@gmail.com> | |
| rem Released under the MIT license | |
| rem http://opensource.org/licenses/mit-license.php; | |
| rem |
(随時更新中)
何かと便利なUSB接続のデジタルI/Oツール。
| $ ps ax | grep -i wayland | |
| 822 tty1 Ssl+ 0:00 /usr/lib/gdm3/gdm-wayland-session env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu | |
| 921 tty1 Sl+ 0:01 /usr/bin/Xwayland :0 -rootless -noreset -listen 4 -listen 5 -displayfd 6 | |
| 8302 pts/0 S+ 0:00 grep --color=auto -i wayland | |
| $ apt-file search Xwayland | |
| xwayland: /usr/bin/Xwayland | |
| $ apt-cache depends xwayland | |
| xwayland |
| $ cat a.txt | |
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | |
| cccccccccccccccccccccccccccccccccccccccccccccccccc | |
| あああああああああああああああああああああああああああああああ | |
| いいいいいいいいいいいいいいいいいいいい | |
| うううううううううううううう | |
| 123123123123123123123123123123123123 | |
| $ cat a.txt | ruby -ple 'l="";n=0;$_.each_char{|c|l+=c;n+=(c.ord<128?1:2);if(n>40) then n=0;l+="\n" end};$_=l' |
| // | |
| // file2string.cpp | |
| // | |
| // see also... https://stackoverflow.com/questions/2602013/read-whole-ascii-file-into-c-stdstring | |
| // | |
| #include <fstream> | |
| #include <sstream> | |
| #include <iostream> | |
| int main(int argc, char *argv[]) |