- Raspberry Pi ImagerによるRaspberry Pi OSの標準インストールにて、
piユーザーでGUIに自動ログインになる状態を想定。 - Raspberry Pi OS(32bit/64bit) 2023-10-10 Released のGUIはLXDEなので、GUI起動後のアプリ起動はLXDEの作法となる点。
- LXDEの標準ディスプレイマネージャーLXDMのRaspberry Pi OSでの個人設定ファイルは、
~/.config/lxsession/LXDE-pi/autostartxset s offでスクリーンセーバーOFFxset s noblankで黒画面OFFxset -dpmsでDPMSによるディスプレイ側の消灯機能を動かなくする
- GUI上での再生はVLCを使う。VLCはRaspberry Pi OSの標準インストールに含まれる。RaspberryPi Zeroだとパワー不足、Raspberry Pi Zero 2 Wだと再生可能(但しティアリングが発生する)。
VLCのCLIバージョンのcvlcを使う。- コンソールから
cvlcでGUIに表示させる場合、オプションに--vout=mmal_xsplitterを使う。ネット情報で--vout=drm_voutと書かれているものもあったが、うまく動かなかった。 --loopでループ再生。
- コンソールから
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Dim fName | |
| fName = "%fName%" | |
| Dim myWorkBook | |
| Set myWorkBook = GetObject(fName) | |
| Dim xlApp | |
| Set xlApp = myWorkBook.Application | |
| Dim fName2 | |
| fName2 = "%fName2%" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # カレントディレクトリのScreenShot hoge.png を hoge.pngにリネーム | |
| # bashでリネーム 変数 $FILE は ${FILE}とも書ける | |
| # ${FILE##ScreenShot }とすると文頭から最長マッチでその文字列を除去した文字列を値として持つ | |
| for FILE in *; do mv "${FILE}" "${FILE##ScreenShot }"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| #https://codeday.me/jp/qa/20190304/361513.html | |
| import signal, sys | |
| import evdev | |
| from evdev import InputDevice, ecodes, list_devices, categorize | |
| # キースキャンコードとキャラクターの対応リスト | |
| scancodes = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| # Timezoneの設定(GUI使わずコマンドにて) | |
| sudo raspi-config nonint do_change_timezone Asia/Tokyo | |
| # Raspberry PiのSPIを有効にする(GUI使わずコマンドにて) | |
| sudo raspi-config nonint do_spi 0 | |
| # 再起動 | |
| sudo reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stop-Service -Name FontCache ; Set-Service -Name FontCache -StartupType Disabled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mailq | grep '^[0-9a-zA-Z]' | sed -e 's/ .*//' | xargs postcat -q | nkf -Jw | less |
Raspberry Pi 3 B+ を NOOBS 1.92からセットアップ直後からスタートする。
利用するGPS製品ははこれ
GPS受信機キット 1PPS出力付き 「みちびき」対応: センサ一般 秋月電子通商 電子部品 ネット通販
Vcc GND Txd Rxd と 1pps出力の5線あるうち1pps出力以外の4線を利用する。
Vcc に 5V、TxdとRxdは3.3VでOK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| #https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora | |
| # FedoraCoreやEnterpriseLinux(RHEL/CentOS)用のインストール手順 | |
| # RHEL 5/6/7 で使える手順 | |
| # 入るnode.jsはバージョンが一つ古い程度(v6.2.2が公開の時点の2016/6/29でv6.2.1が入った) | |
| # Import yum repository | |
| # curl --silent --location https://rpm.nodesource.com/setup_4.x | bash - | |
| curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - |
Google Chromeのデータセーバー機能は透過プロキシとして動作し、Googleの所有する IPアドレスからアクセスされるのだが、サーバ側でリバースプロキシを構築していると、 多段串を使ってアクセスしてるかのような状態になる。
NginxとApacheの間で、リバースプロキシ環境を構築化でクライアントのIPアドレスを
伝える仕組みとして、Apache側に mod_rpaf を入れて、Nginx側でリクエストヘッダ
を調整する方法があるのだけれども、データセーバーを使われてしまうと、Apache側
では、GoogleのProxyアクセスのIPアドレスが記録されてしまう。
NewerOlder
