From ad2ea54436e97a18fde5494c6ce4a88e0cee26c8 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Fri, 28 Feb 2025 12:51:36 +0100 Subject: [PATCH] Tech: more info --- Tech/Raspi/MHS 3.5 Inch Display.md | 36 ++++++++++++++++++++++ Tech/Raspi/info.md | 22 ++++++++++++++ Tech/bash.md | 20 +++++++++++++ Tech/docker.md | 12 ++++++++ Tech/dosbox.md | 7 +++++ Tech/firefox.md | 48 ++++++++++++++++++++++++++++++ Tech/ssh.md | 19 ++++++++++++ 7 files changed, 164 insertions(+) create mode 100644 Tech/Raspi/MHS 3.5 Inch Display.md create mode 100644 Tech/Raspi/info.md create mode 100644 Tech/bash.md create mode 100644 Tech/docker.md create mode 100644 Tech/dosbox.md create mode 100644 Tech/firefox.md create mode 100644 Tech/ssh.md diff --git a/Tech/Raspi/MHS 3.5 Inch Display.md b/Tech/Raspi/MHS 3.5 Inch Display.md new file mode 100644 index 0000000..eac10bd --- /dev/null +++ b/Tech/Raspi/MHS 3.5 Inch Display.md @@ -0,0 +1,36 @@ +# README + +git clone https://github.com/goodtft/LCD-show.git +cd LCD-show +sudo ./MHS35-show + +## Display rotation + +cd LCD-show/ +sudo ./rotate.sh 90 + +## Fail to display on HDMI + +Following the steps of the wiki page to install the driver supporting FPCP, the above display can display normally. + +However, the hdmi-connected monitor displays nothing or is prompted "input not supported", etc +Analysis + +Since the default output resolution of the driver installed in the above products is 480*320, + +but many traditional HDMI displays do not support HDMI input signal lower than 640*480, + +the HDMI display cannot display normally or even without display. +Solution + + Open the "config. txt" file in the TF root directory, + Find the line at the end of the file + +hdmi_cvt 480 320 60 6 0 0 0 + + Change the value of 480*320 to 640*480, 800*480 or the higher resolution (note the space), + For example: change to 800*480 resolution + +hdmi_cvt 800 480 60 6 0 0 0 + + Save and safely pop up TF, insert raspberry pie and restart. diff --git a/Tech/Raspi/info.md b/Tech/Raspi/info.md new file mode 100644 index 0000000..e888492 --- /dev/null +++ b/Tech/Raspi/info.md @@ -0,0 +1,22 @@ +# Info + +sudo apt remove lxplug-ptbatt -> remove notification for low power voltage + +in /boot/config.txt: +[all] +hdmi_force_hotplug=1 +dtparam=i2c_arm=on +dtparam=spi=on +enable_uart=1 +dtoverlay=mhs35:rotate=90 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +# Default resolution for MHS screen is 480x320 +# Best small resultion supported by projo is 720x400 +hdmi_cvt 720 400 60 6 0 0 0 +hdmi_drive=2 + +# Disable under-voltage warning +avoid_warnings=1 + diff --git a/Tech/bash.md b/Tech/bash.md new file mode 100644 index 0000000..fd9705a --- /dev/null +++ b/Tech/bash.md @@ -0,0 +1,20 @@ +# Bash + +## History + +**Ctrl+R** will open the search history window. +You may now use Ctrl+R again to search for the previous match. + +## Edit current line in EDITOR + +**Ctrl-X**, **Ctrl-E**: will open the current line in EDITOR. + +## Arrays + +```bash + arr=(1 2 3) + echo ${arr[0]} + echo ${arr[@]} + echo ${arr[*]} + echo ... +``` diff --git a/Tech/docker.md b/Tech/docker.md new file mode 100644 index 0000000..e4feacd --- /dev/null +++ b/Tech/docker.md @@ -0,0 +1,12 @@ +# Docker + + + +Although this is an old question I recently had the same problem. It was trying to use a directory inside a fuse mount as a volume in docker-compose. The fuse mount was created by the seadrive-daemon (from the Seafile project) but the found solution is pretty standard. + +The problem is that root doesn't have access to the fuse mount. You can check this by login in as root and performing a simple ls of the folder in question. You need to mount the fuse drive with the option "allow_root". Either in /etc/fstab or in my case passing the option to the seadrive-daemon with -o allow_root. + +In order to be able to even use the allow_root option as non-root user you must enable it in /etc/fuse.conf by uncommenting or adding the following line: + +user_allow_other + diff --git a/Tech/dosbox.md b/Tech/dosbox.md new file mode 100644 index 0000000..05fb2db --- /dev/null +++ b/Tech/dosbox.md @@ -0,0 +1,7 @@ +# DosBox + +Try putting usescancodes=false in the [sdl] part of the relevant dosbox.conf + +Try using staging version hich uses new SDL which shold fix arrows problems + +Ctrl+F1 = mapping system (will create mapper file in exe directory) diff --git a/Tech/firefox.md b/Tech/firefox.md new file mode 100644 index 0000000..02b2d1f --- /dev/null +++ b/Tech/firefox.md @@ -0,0 +1,48 @@ +# Firefox + +## Enable Browser Toolbox (userChrome editor) + +The Browser Toolbox enables you to debug add-ons and the browser’s own JavaScript code rather than just web pages like the normal Toolbox. The Browser Toolbox’s context is the whole browser rather than justsingle page on a single tab. +Enabling the Browser Toolbox + +The Browser Toolbox is not enabled by default. To enable it you need to check the settings "Enable chrome and addon debugging" and "Enable remote debugging". + +To do this, open the Developer Tools Settings, go to the section Advanced Settings, and check the settings "Enable browser chrome and add-on debugging toolboxes" and "Enable remote debugging". + +Opening the Browser Toolbox + +Open the Browser Toolbox through the menu button new fx menu and the menu items "Developer" then "Browser Toolbox". + +You can also open it with the Ctrl + Alt + Shift + I key combination (Cmd + Opt + Shift + I on a Mac). + +## Some useful configuration options + +### Tabs + +/opt/change-pref.sh middlemouse.openNewWindow true # false = do nothing +/opt/change-pref.sh browser.tabs.opentabfor.middleclick false # so, window +/opt/change-pref.sh browser.link.open_newwindow 2 # windows (3 = tabs) +/opt/change-pref.sh browser.startup.homepage_override.mstone '"ignore"' +/opt/change-pref.sh startup.homepage_welcome_url '"about:blank"' +/opt/change-pref.sh startup.homepage_welcome_url.additional '"about:blank"' +/opt/change-pref.sh browser.shell.checkDefaultBrowser false +/opt/change-pref.sh browser.aboutwelcome.enabled false +/opt/change-pref.sh datareporting.policy.firstRunURL '""' +/opt/change-pref.sh app.normandy.first_run false + +### UI + +/opt/change-pref.sh toolkit.legacyUserProfileCustomizations.stylesheets true +/opt/change-pref.sh browser.tabs.inTitlebar 0 +/opt/change-pref.sh network.security.ports.banned.override '""' + +### Statistics + +/opt/change-pref.sh app.shield.optoutstudies.enabled false +/opt/change-pref.sh datareporting.healthreport.service.enabled false +/opt/change-pref.sh toolkit.telemetry.unified false + +### Home page + +/opt/change-pref.sh browser.startup.homepage '"http://nikiroo.be"' + diff --git a/Tech/ssh.md b/Tech/ssh.md new file mode 100644 index 0000000..4586c48 --- /dev/null +++ b/Tech/ssh.md @@ -0,0 +1,19 @@ +cat id_rsa.ssh id_rsa.x509.pub > id_rsa.pem + +note: PEM = ssh (priv) + x509 (pub) +note: x509 = crt +/// + +use: id_rsa -> pem +use: id_rsa.pub -> default ssh +use: id_rsa.pub.pem -> pem + + +open-ssh -> RSA pem: + ssh-keygen -p -N "" -m pem -f id_rsa.openssh + ++ pub key .pem: + openssl rsa -pubout -in id_rsa.pem -out id_rsa.pem.pub + ++ pem (text) -> der (binary) + openssl rsa -inform PEM -outform DER -in id_rsa.pem -out id_rsa.der -- 2.27.0