2021年7月13日 星期二

My usual Git Projects

2021-07-13


CaltexPower

flaskw3html

GrandTalent

K11Auto

MetaTraderApiMT4

MetaTraderApiMT5

MyNodeExpress

OnlineCode

pytelegram

RickyBank

ZeroMQCppPy




2021年7月12日 星期一

Wireshark on Ubuntu 20

 https://linuxhint.com/install_wireshark_ubuntu/


$ sudo apt update

$ sudo apt install wireshark

$ sudo usermod -aG wireshark $(whoami)


$ wireshark

$ sudo wireshark

NodeJS on Ubuntu 20

 https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04


sudo apt update

sudo apt install nodejs

nodejs -v # 10.19.0


sudo apt install npm


Yeah!

GitExtension on Ubuntu 20

 GitExtension on Ubuntu 20


https://github.com/gitextensions/gitextensions/wiki/How-To:-run-Git-Extensions-on-Linux


sudo apt install git

git --version # 2.25.1

sudo apt install kdiff3

kdiff3 --version # 1.8.1


Mono

sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel
sudo apt install mono-complete
mono --version # 6.12.0.122

SSH
apt-get install ssh-client
sudo apt install ksshaskpass

Yeah! Done!

Main Ubuntu 20.04.2 Installation PyCharm Vim apt install Python Netbeans Eclipse

General

sudo apt install hardinfo
lsb_release -a # linux standard base returns 20.04
lspci | grep Realtek
uname -a # 5.8.0 or 5.13
sudo hostname ricky-pc


tool
sudo apt-get install ncdu
# use up down left right q c


ufw
sudo ufw status
# Status: inactive
sudo ufw enable
sudo ufw status
# Status: active
ufw status numbered
ufw delete 1

sudoer
sudo nano /etc/sudoers # or sudo visudo
# add line to bottom, must be after $sudo line
leungric ALL=(ALL:ALL) NOPASSWD:ALL
sudo ls -al /root
# no prompt

ssh
sudo apt install ssh
sudo systemctl enable --now ssh
sudo systemctl status ssh
sudo ufw allow ssh/tcp


rdp (not quite working)

sudo apt-get install -y xrdp
sudo systemctl enable xrdp


vnc (ugly but working)
# https://tecadmin.net/install-vnc-server-on-ubuntu-20-04/
sudo apt install tigervnc-standalone-server -y
vncpasswd
# enter 8 char pw
vncserver -localhost no
# New '1037u:1 (leungric)' desktop at :1 on machine 1037u
# Starting applications specified in /home/leungric/.vnc/xstartup
# Log file is /home/leungric/.vnc/1037u:1.log
# Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/leungric/.vnc/passwd 1037u:1 to connect to the VNC server.
vncserver -list
# X DISPLAY #RFB PORT #PROCESS ID
# :1 5901 2141
sudo ufw allow 5901/tcp
sudo ufw status
# 5901/tcp ALLOW anywhere
# Windows TightVNC Viewer 192.168.1.103:1
# guacamole 192.168.1.103 5901 can work

vnc "authentucation is required to create a color profile" (working in 2022)
# https://devanswers.co/how-to-fix-authentication-is-required-to-create-a-color-profile-managed-device-on-ubuntu-20-04-20-10/
vnc, CTRL ALT T, nautilus
sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf

polkit.addRule(function(action, subject) {
 if ((action.id == "org.freedesktop.color-manager.create-device" ||
 action.id == "org.freedesktop.color-manager.create-profile" ||
 action.id == "org.freedesktop.color-manager.delete-device" ||
 action.id == "org.freedesktop.color-manager.delete-profile" ||
 action.id == "org.freedesktop.color-manager.modify-device" ||
 action.id == "org.freedesktop.color-manager.modify-profile") &&
 subject.isInGroup("{users}")) {
 return polkit.Result.YES;
 }
});

sudo reboot
vncserver -kill :2
vncserver -localhost no
vnc-server -list
# Windows 10 TightVNC Viewer 192.168.1.103:3


# a working xfce4 xstartup

cat xstartup.working.xfce 

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
startxfce4 &


vnc service (seems better)
# https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04



Python
sudo apt install python3-distutils
sudo apt install python3-apt
sudo apt install python3-pip
sudo apt install python-is-python3


Office

sudo apt install thunderbird
sudo apt install openvpn unzip network-manager-openvpn
sudo apt install vim


Chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

sudo apt install ./google-chrome-stable_current_amd64.deb


Signal

wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
  sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
sudo apt update && sudo apt install signal-desktop


C++
sudo apt install make
sudo apt install gcc
sudo snap install netbeans --classic

Java Eclipse
sudo apt update
sudo apt install default-jre
sudo snap install --classic eclipse

Wireshark
sudo apt install wireshark


Editors
sudo apt install ghex
# sublime, vscode, notepad++(ugly)

Compiling Realtek RTL8125 Network Card Driver on Ubuntu 20.04.2 LTS

 https://askubuntu.com/questions/1259947/cant-get-rtl8125b-working-on-20-04

 

lspci -knn | grep Realtek
06:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 04)
 

$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:    focal
 

 Here's a solution I found;
    Go to the Realtek website 992
    Download the Unix(Linux) r8125 driver. You will need to give an email address.
    1754×445
    Go to /Downloads directory. Extract the Tarball.
    In Terminal, go into r8125-xxxx folder and run the autorun.sh
    $ sudo ./autorun.sh
Everything should run automatically and you should get ethernet connection now.

 

TUF GAMING B550M-PLUS 

AMD B550
Realtek RTL8125B 2.5Gb Ethernet

 

 

 

 $ sudo ./autorun.sh

Check old driver and unload it.
rmmod r8125
Build the module and install
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
sign-file: certs/signing_key.pem: No such file or directory
Warning: modules_install: missing 'System.map' file. Skipping depmod.
DEPMOD 5.8.0-43-generic
load module r8125
Updating initramfs. Please wait.
update-initramfs: Generating /boot/initrd.img-5.8.0-43-generic
Completed.


ip link

sudo ip link set enp6s0 up

2021年7月8日 星期四

2021 Stack Overflow Tech List






-------------------------------------------------------------------------------------------





















-------------------------------------------------------------------------------------------












2007 to 2023 HP and Dell Servers Comparison

  HP Gen5 to Gen11  using ChatGPT HP ProLiant Gen Active Years CPU Socket Popular HP CPUs Cores Base Clock Max RAM Capacity Comparable Dell ...