# 202002 ## ADVA certified expert - 伝送のcert. - https://www.adva.com/en/resources/downloads/pdf/adva-certified-expert ## [GitHub - treasure-data/perfectqueue: Highly available distributed queue built on RDBMS](https://github.com/treasure-data/perfectqueue) ## React - [イベントリファレンス | MDN](https://developer.mozilla.org/ja/docs/Web/Events) - [DOM on-イベントハンドラ - 開発者ガイド | MDN](https://developer.mozilla.org/ja/docs/Web/Guide/Events/Event_handlers) - [React書き方変わりすぎ問題 - Qiita](https://qiita.com/like_and_co/items/2fa742c2812a4c3c654f) - [@babel/plugin-proposal-class-properties Babel](https://babeljs.io/docs/plugins/transform-class-properties/) ### create-react-appしたsrcをbuildしてdeployする create-react-appしたdoucment rootの`package.json`に ``` [ "homepage": "." #ここのpathはbuildされるpathの頭につくもの.http://で指定してもよければ絶対パスでもよさそう.デフォルトが`/`なのでパスが通らない可能性が高い. ...(omit) ] ``` を追加して `npm run build` して`build`をデプロイ. ## [Druid | Interactive Analytics at Scale](https://druid.apache.org/) ## [RubyからGoogle APIにアクセスするのは半端なくめんどくさい - Qiita](https://qiita.com/ts-3156/items/1f84d06e50795a9df4c8) ## rubyからgoogle apiを叩く. - 0.8以降から認証方式や関数のスキーマなどが大きく変わってかなり非互換. - とりあえず追従するために最新のlibでサポートされる認証方式を用いるようにupdateした際のmemo. 叩き方は下記. - [GitHub - googleapis/google-api-ruby-client: REST client for Google APIs](https://github.com/googleapis/google-api-ruby-client) - [google-api-ruby-client/generated/google/apis at master · googleapis/google-api-ruby-client · GitHub](https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google/apis) - [RubyでGoogle Calendarをサービスアカウントから操作する - Qiita](https://qiita.com/hotpepsi/items/9467adf0c01798b3e212) - [google-calendar-ruby/google-calendar.rb at master · firewood/google-calendar-ruby · GitHub](https://github.com/firewood/google-calendar-ruby/blob/master/google-calendar.rb) - [RubyからGoogle APIにアクセスするのは半端なくめんどくさい - Qiita](https://qiita.com/ts-3156/items/1f84d06e50795a9df4c8) - [GitHub - googleapis/google-auth-library-ruby: Google Auth Library for Ruby](https://github.com/googleapis/google-auth-library-ruby) ## [フリーBGM素材「雨の日」試聴ページ|フリーBGM DOVA-SYNDROME](https://dova-s.jp/bgm/play10305.html) ## [GitHub - billchurch/webssh2: Web SSH Client using ssh2, socket.io, xterm.js, and express. webssh webssh2](https://github.com/billchurch/webssh2) ## [ethernuno | Open Source Knowledge](https://ethernuno.wordpress.com/) ## slackbot - [GitHub - lins05/slackbot: A chat bot for Slack (https://slack.com).](https://github.com/lins05/slackbot) - [PythonのslackbotライブラリでSlackボットを作る - Qiita](https://qiita.com/sukesuke/items/1ac92251def87357fdf6) - [pythonスクリプトをdaemonにする[systemd編] - Qiita](https://qiita.com/katsuNakajima/items/7ece6c74f992f652d732) ## [Nork's daily how to](http://blog.ninth-nine.com/) ## [オシロスコープの脱獄 テクトロ TDS3000 - 測定器改造](https://yuukijapantechnology.blog.fc2.com/blog-entry-72.html) ## [SPI/I2C Serial EEPROMへのアクセスを簡単に(その1) – RATOC e2e Store Blog](https://www.ratoc-e2estore.com/blog/2012/11/usb61-01) ## やりたくなってきたこと - stratum1なNTPサーバ with raspberry pi1 modelB - きのこ買うか - raspberry pi console hat - Kicadで基板つくるの久々にやりたい.USB hub ICとRS232なICでよさそう. - raspberry pi でKVMconsoleなんとかならないか... - bluetooth とかでいけると本当に嬉しいんだけれども. - 実際wifiでvncでとよさそう - hdmi inputできるhatはあるから,keyboard出力部(raspiにキーボード出力させる)だけうまいこと作れば行けそうな気はする. - マウスは正直プロトタイプ的にはなくていい気がする.HIDを1本のUSBでmouse/keyいれればいいだけなので難しくはなさそう. - webアクセスできたらうれしいかも. - 電力計そろそろ - 電子工作久々にやりたい. ## イーサネットペイロードが1500bytesな件 イーサネットのペイロードサイズがなぜ最大1500バイトになったのかは、①当時の高速なバッファリングが可能なのがこれくらいだった説②当時のクロック精度限界説③自分が暴走して信号を送信しっぱなしになってないか監視する部品の設定がたまたま1500バイトだった説、の3つくらいを聞いたことある [---さんのツイート: "イーサネットのペイロードサイズがなぜ最大1500バイトになったのかは、①当時の高速なバッファリングが可能なのがこれくらいだった説②当時のクロック精度限界説③自分が暴走して信号を送信しっぱなしになってないか監視する部品の設定がたまたま1500バイトだった説、の3つくらいを聞いたことある"](https://twitter.com/hdais/status/1230316458422325248?s=21) ## [SEILにSSTPでリモートアクセス可能に](https://www.seil.jp/blog/12.html) ## [Niantic, Inc. hiring Software Engineer, Site Reliability in Tokyo, Tokyo, Japan | LinkedIn](https://www.linkedin.com/jobs/view/1722217460/) ## [Amazon Web Services (AWS) hiring APAC Network Technician in Tokyo, Tokyo, Japan | LinkedIn](https://www.linkedin.com/jobs/view/1721231134/) ## [Encryption at Rest in Google Cloud Platform  |  Documentation](https://cloud.google.com/security/encryption-at-rest/default-encryption/) ## アップロード向けのCDNみたいな. ## [GitHub - roma-glushko/tango: Tango is a command-line tool for analyzing access logs](https://github.com/roma-glushko/tango#usage) ## [高専生の就活について思うこと~高専生の強みと技術力と~ | 瀬戸内の雲のように](https://www.setouchino.cloud/blogs/42) ## [Visio Stencils for the VMware Validated Designs |VMware Communities](https://communities.vmware.com/docs/DOC-38595) ## [Requirements for PostgreSQL template [Zabbix Documentation 4.4]](https://www.zabbix.com/documentation/current/manual/config/templates_out_of_the_box/requirements/postgresql) - [zabbix/templates/db/postgresql at master · zabbix/zabbix · GitHub](https://github.com/zabbix/zabbix/tree/master/templates/db/postgresql) - [[ZBXNEXT-1420] Provide ability to create calculated item based on several discovered ones - ZABBIX SUPPORT](https://support.zabbix.com/browse/ZBXNEXT-1420) - [VMware ESXi - How to shutdown vmnic interface](http://tomaskalabis.com/wordpress/vmware-esxi-how-shutdown-vmnic-interface/) - [cron(crontab)の代わりにsystemdのtimerを使う - @znz blog](https://blog.n-z.jp/blog/2017-06-04-cron-systemd-timer.html) - https://www.nic.ad.jp/ja/materials/iw/2011/proceedings/d3/d3-06.pdf - [iSCSIが切断された時どうなるか検証(ESXi) | fefcc.net](https://fefcc.net/archives/475) - [Writing udev rules - ja](http://mux03.panda64.net/docs/udevrules_ja.html) WIFI:T:;S:;P:;; https://github.com/skip2/go-qrcode ``` % qrcode -t "WIFI:T:WPA2;S:jp7fkf-test;P:testest;;" ``` https://nghttp2.org/documentation/h2load-howto.html ## こんな感じで怒られる ``` Mar 10 23:58:56 test01 kernel: [79337.475519] audit: type=1400 audit(1583852336.713:203): apparmor="DENIED" operation="open" profile="snap.chromium.chromedriver" name="/proc/17853/mem" pid=17853 comm="5eefc9322c78972" requested_mask="r" denied_mask="r" fsuid=1001 ouid=1001 ``` ``` % diff /var/lib/snapd/apparmor/profiles/snap.chromium.chromedriver_old /var/lib/snapd/apparmor/profiles/snap.chromium.chromedriver --- /var/lib/snapd/apparmor/profiles/snap.chromium.chromedriver_old 2020-03-11 00:16:15.171080842 +0900 +++ /var/lib/snapd/apparmor/profiles/snap.chromium.chromedriver 2020-03-11 00:15:32.607853277 +0900 @@ -47,6 +47,9 @@ owner @{HOME}/.Private/ r, owner @{HOMEDIRS}/.ecryptfs/*/.Private/ r, + # workaround + @{PROC}/@{pid}/mem r, + # for python apps/services #include /usr/bin/python{,2,2.[0-9]*,3,3.[0-9]*} ixr, [jp7fkf@test01 0:17:01] /etc/apparmor.d % sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.chromium.chromedriver ``` ## [Wine Shop Soleic / TOPページ](https://wine.soleic.jp/) - 上野で出会ったe-wine shop. ## UPSのプロトコル - Q1とかその辺り - https://www.upspowercom.com/Download/UPS-Protocol.pdf ## Zabbixからslackへ通知する - https://www.zabbix.com/integrations/slack ## メトリクスモニタリングと連携して設定したSLA/SLOにもとづきerr budget等がすぐ見えるポータル的なOSSないのかな ## [GitHub - nornir-automation/nornir: Pluggable multi-threaded framework with inventory management to help operate collections of devices](https://github.com/nornir-automation/nornir) ## GNS3 installation battle on Ubuntu 18.04 - [Installation on Linux - GNS3](https://docs.gns3.com/1QXVIihk7dsOL7Xr7Bmz4zRzTsJ02wklfImGuHwTlaA4/index.html) - [Ubuntu 16.04 LTS + GNS3 v1.4.5 リモートサーバの構築 — Memo ドキュメント](https://pochio.github.io/old_memo/oss/gns3-on-cloud.html) Installation guideに沿ってやるだけ.ただし ``` sudo usermod -aG group ubridge,libvirt,kvm,wireshark,docker ``` はできなかったので,`ubridge`と`wireshark`を除いて ``` sudo usermod -aG group libvirt,kvm,docker ``` で実施. - systemdで管理. ``` # vi /etc/systemd/system/gns3server.service [Unit] Description=GNS3 server After=syslog.target After=network.target [Service] Type=simple User=root Group=root ExecStart=/usr/bin/gns3server # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 [Install] WantedBy=multi-user.target ``` ``` systemctl daemon-reload systemctl enable gns3server systemctl start gns3server ``` ## slack api でpost - `curl -XPOST -d 'token=xoxb-0000000000000-00000000000-xxxxxxxxxxxxxxxxxxxxxxxx' -d 'channel=hoge' -d 'text=Hello World' -d 'icon_emoji=rotating_light' 'https://slack.com/api/chat.postMessage'` ## homebrew をdotfiles管理したい - brew bundleを使う ``` % brew bundle dump ==> Tapping homebrew/bundle Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'... remote: Enumerating objects: 55, done. remote: Counting objects: 100% (55/55), done. remote: Compressing objects: 100% (47/47), done. remote: Total 4377 (delta 12), reused 30 (delta 5), pack-reused 4322 Receiving objects: 100% (4377/4377), 961.74 KiB | 1.23 MiB/s, done. Resolving deltas: 100% (2537/2537), done. Tapped 1 command (101 files, 1.3MB). % ls Brewfile setup.sh* sublimetext3/ % head -n 10 Brewfile tap "chef/chef" tap "homebrew/bundle" tap "homebrew/cask" tap "homebrew/core" tap "homebrew/services" brew "arping" brew "bat" brew "xz" brew "python" brew "colordiff" ``` - Brewfileがあれば`brew bundle`を一括installできる. - `brew bundle cleanup`でBrewfileに記載のもの以外を削除する(Brewfileに記載されたものだけがinstallされた状態にする) - `brew bundle dump` でhomebrewでinstallされたものをBrewfileに書き出す.(そのままbrew bundleで読めるので楽) ## nfc (RC-S380P) - `sudo sh -c 'echo SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"054c\", ATTRS{idProduct}==\"06c3\", GROUP=\"plugdev\" >> /etc/udev/rules.d/nfcdev.rules'` ``` % lsusb (git)-[master] Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 007: ID 0590:0081 Omron Corp. Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 010: ID 054c:06c3 Sony Corp. RC-S380 Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub % sudo usermod -aG plugdev jp7fkf % ./tagtool.py --device usb:054c:06c3 (git)-[master] [nfc.clf] searching for reader on path usb:054c:06c3 [main] access denied for device with path usb:054c:06c3 [main] no contactless reader available % sudo sh -c 'echo SUBSYSTEM==\"usb\", ACTION==\"add\", ATTRS{idVendor}==\"054c\", ATTRS{idProduct}==\"06c3\", GROUP=\"plugdev\" >> /etc/udev/rules.d/nfcdev.rules' % sudo udevadm control --reload % sudo rmmod port100 % ./tagtool.py --device usb:054c:06c3 [nfc.clf] searching for reader on path usb:054c:06c3 [nfc.clf] using SONY RC-S380/P NFC Port-100 v1.11 at usb:001:006 ** waiting for a tag ** Type2Tag 'NXP NTAG213' ID=zzzzzzzzzzzzzz NDEF Capabilities: readable = yes writeable = yes capacity = 137 byte message = 0 byte ``` ## https://www.youtube.com/watch?v=_aYIsXFaKTs ## https://www.monotaro.com/g/02412542/ ## raspberry pi でlogitechのusbカメラを使う(mjpg-streamer) - macもwindowsもドライバがなくなってしまったっぽいからlinuxで使ってやる.まぁwin/macでもまだこねればいけるとおもうけど. ``` % lsusb Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 0590:0081 Omron Corp. Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 006: ID 054c:06c3 Sony Corp. RC-S380 Bus 001 Device 007: ID 046d:08c3 Logitech, Inc. Camera (Notebooks Pro) Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub % ls -la /dev/video* crw-rw---- 1 root video 81, 0 Mar 22 19:36 /dev/video0 crw-rw---- 1 root video 81, 1 Mar 22 19:36 /dev/video1 % sudo apt-get install subversion imagemagick libjpeg-dev % svn checkout svn://svn.code.sf.net/p/mjpg-streamer/code/ mjpg-streamer % cd mjpg-streamer/mjpg-streamer/ % make % sudo make install % mjpg_streamer -i "/usr/local/lib/input_uvc.so -y -q 100 -r 1280x720 -f 30" -o "/usr/local/lib/output_http.so -w ./www -p 10080" MJPG Streamer Version: svn rev: 3:172 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 1280 x 720 i: Frames Per Second.: 30 i: Format............: YUV i: JPEG Quality......: 100 ERROR opening V4L interface: Permission denied Init v4L2 failed !! exit fatal i: init_VideoIn failed svn: warning: cannot set LC_CTYPE locale svn: warning: environment variable LC_CTYPE is UTF-8 svn: warning: please check that your locale name is correct %sudo usermod -aG video jp7fkf % mjpg_streamer -i "/usr/local/lib/input_uvc.so -y -q 100 -r 1280x720 -f 30" -o "/usr/local/lib/output_http.so -w ./www -p 10080" MJPG Streamer Version: svn rev: 3:172 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 1280 x 720 i: Frames Per Second.: 30 i: Format............: YUV i: JPEG Quality......: 100 i: The format asked unavailable, so the width 1280 height 960 Adding control for Pan (relative) UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Tilt (relative) UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Pan Reset UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Tilt Reset UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Pan/tilt Reset UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device Adding control for Focus (absolute) UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device mapping control for Pan (relative) UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Tilt (relative) UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Pan Reset UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Tilt Reset UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Pan/tilt Reset UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Focus (absolute) UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for LED1 Mode UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for LED1 Frequency UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Disable video processing UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device mapping control for Raw bits per pixel UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device o: www-folder-path...: ./www/ o: HTTP TCP port.....: 10080 o: username:password.: disabled o: commands..........: enabled ^Csetting signal to stop i: cleaning up ressources allocated by input thread ^[[A^[[Bforce cancellation of threads and cleanup resources o: cleaning up ressources allocated by server thread #00 done svn: warning: cannot set LC_CTYPE locale svn: warning: environment variable LC_CTYPE is UTF-8 svn: warning: please check that your locale name is correct ``` - [Webカメラを使ってUbuntuで動画をストリーミング配信(mjpg-streamer使用)&Home Assistantで監視 | web net FORCE](https://webnetforce.net/web-camera-mjpg-streamer/) ## 牛乳寒天じゃないけど牛乳ゼラチンなデザート - 750mlの牛乳に対してゼラチン25gは多すぎる.15-20gくらいでよさそう.