2019年1月17日 星期四

kinyo kbx 66 usb 超薄鍵盤


多年前買的 usb 鍵盤 壞了  記錄一下


http://www.cynet.com.tw/webshop/webshop.exe/browse?CODE=KBX-66&PID=...&CTYPE=%C1%E4%BDL%B7%C6%B9%AB&PAGE=1


KINYO KBX-66鍵盤USB
KBX66 Mini剪刀腳鍵盤

‧全平面超薄設計, 展現現代科技美感

‧剪刀腳彈力結構,觸感柔軟無聲、超靈敏

‧共87鍵及5個多媒體獨立按鍵

‧迷你造型,輕巧不佔空間

‧適用於Windows 98/2000/ME/XP

‧界面接頭 :USB接頭


長:43~44
寬:17~18
售價:$400

http://www.pcstore.com.tw/singzn/M05281393.htm

「YEs 3C」全新 KINYO 耐嘉 KBX66 迷你多媒體鍵盤 剪刀腳結構 5組快捷鍵 超薄 靜音 /USB 免運 yes3c


介面接頭 :USB 介面,隨插即用
尺寸:長33.5公分 x 寬16公分 x 高2公分

https://www.mobile01.com/topicdetail.php?f=497&t=881104


kinyo kbx66 "迷你鍵盤" (剪刀腳、薄鍵、便宜,外加沒用過"迷你"型)
回饋力道比"羅技"的快意手(薄膜)強,個人覺得是太硬,
但是安靜不少是真的,
(買了之後才發現個人很不習慣黑底白字,但沒有白色的可選)
而且按鍵上面的字型也和羅技的不一樣,和benq出的廉價鍵盤是一樣的,看起來有點不適應。)

有些blug有提到這款鍵盤『enter、space』上的缺點,但是我目前還沒遇到,
可能他買的是籤王、可能我這一個的時候未到,一切待時間來驗證。
但是"fn、delete"鍵的位置我就和這些"先進"的感覺是一樣的,
這樣的設計真的的很不順手。

看來要重新適應了。
(如果可以重來,我還是要買"白色的")

補充:kinyo kbx66 其按鍵上的字是用"貼"的,不是像"羅技 快意手"用雷射刻上去的,
所以用久了,kbx66會字跡會被磨掉。

2018年11月14日 星期三

被選舉人 年齡

村里長 23歲
立委 23歲
縣市議員 23歲
鄉民代表 23歲

鄉長 26歲

直轄市/縣市長 30

總統 40

linux netcat

參考
https://blog.gtwang.org/linux/linux-utility-netcat-examples/


檔案接收者
nc -l 5000 > branch-rtl819x-sdk-v3.4.11.tar

nc 172.21.69.1 5000 < branch-rtl819x-sdk-v3.4.11.tar


nc -l 50000 > my_svn_new_checkout.sh

nc 172.21.69.4 5000 < my_svn_new_checkout.sh


在兩台主機之間複製檔案
假設現在有兩台主機,分別為 A 主機與 B 主機,若要將一個檔案從 A 主機複製到 B 主機,可以先在 B 主機(檔案接收者)上執行:

nc -l 5000 > my.jpg
然後在 A 主機(檔案傳送者)上執行:

nc hostB.com 5000 < my.jpg
這樣就可以把 my.jpg 這個檔案從 A 主機複製到 B 主機上了。 雖然這個方式跟 scp 指令比起來可能不是最方便的,但是它的特點是不需要登入的動作(也就是說不需要任何帳號與密碼),假設你碰到兩台主機無法互相登入的時候,就可以使用這樣的方式處理。


接收端
ubuntu  18.04

nc -l 50000 > my_svn_new_checkout.sh



傳送端
debian 9.6

nc 172.21.69.4 50000 -q 1 < my_svn_new_checkout.sh



傳送端
ubuntu  18.04

nc 172.21.15.145 50000 -q 1 < my_svn_new_checkout.sh


     -N      shutdown(2) the network socket after EOF on the input.  Some servers
             require this to finish their work.




centos 7 防火牆 注意
sudo firewall-cmd --zone=public --add-port=50000-55500/tcp --permanent

sudo firewall-cmd --reload

sudo firewall-cmd --zone=public --list-ports
19999/tcp 5001/tcp 5201/tcp 50000-55500/tcp


centos firewall reference
https://unix.stackexchange.com/questions/409878/centos-7-open-a-port
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-7
https://mangolassi.it/topic/8380/centos-7-open-firewall-ports-range-on-firewalld

https://www.thegeekdiary.com/how-to-test-port-connectivity-using-nc-utility-in-centos-rhel/



netcat 參考
https://www.linuxtechi.com/nc-ncat-command-examples-linux-systems/
https://www.arthurtoday.com/2015/10/ubuntu-replace-telnet-with-nc-command.html
https://www.tecmint.com/check-remote-port-in-linux/
https://ithelp.ithome.com.tw/articles/10136033

firewall and netcat
https://fabianlee.org/2016/09/26/ubuntu-pre-validate-network-acl-and-firewall-connectivity-with-netcat/
https://itekblog.com/test-firewall-with-netcat/
https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps


debian firewall
https://wiki.debian.org/DebianFirewall


netcat for window 下載
https://eternallybored.org/misc/netcat/

linux 系統監控工具

glances (python)

htop
top
nmon
iostat

glances
https://www.maketecheasier.com/glances-monitor-system-ubuntu/


hegemon
https://www.tecmint.com/install-rust-programming-language-in-linux/
https://www.tecmint.com/hegemon-system-monitoring-tool-for-linux/


https://opensource.com/life/16/2/open-source-tools-system-monitoring
top
atop
htop
glances


netdata
monitorix
collectd


lshw
lscpu
lspci
lsusb


sudo dmidecode



harddisk

sudo smartctl -a /dev/sda

blkid

破壞性寫入測試
badblocks -wsv /dev/xxxdisk

fdisk/gdisk/parted


nload is a console application which monitors network traffic and bandwidth




hddtemp - Utility to monitor hard drive temperature

dmidecode is a tool for dumping a computer's DMI (some say SMBIOS ) table contents in a human-readable format.


lm_sensors (Linux monitoring sensors) is a free and open-source application that provides tools and drivers for monitoring temperatures, voltage, and fans.


smartmontools smartctl - Control and Monitor Utility for SMART Disks
smartctl controls the Self-Monitoring, Analysis and Reporting Technology (SMART) system built into many ATA-3 and later ATA, IDE and SCSI-3 hard drives.


nullmailer is an relay-only forwarding MTA (Mail Transfer Agent).

ranger - visual file manager

GNU Midnight Commander is a visual file manager,

netcat is a simple unix utility which reads and writes data across network connections, using TCP or UDP protocol.

2018年11月7日 星期三

lzma linux image tool

 ./lzma e vmlinux_img vmlinux_img.gz


LZMA 4.06 Copyright (c) 1999-2004 Igor Pavlov  2004-09-05

Usage:  LZMA <e|d> inputFile outputFile [<switches>...]
  e: encode file
  d: decode file
  b: Benchmark
<Switches>
  -a{N}:  set compression mode - [0, 2], default: 2 (max)
  -d{N}:  set dictionary - [0,28], default: 23 (8MB)
  -fb{N}: set number of fast bytes - [5, 255], default: 128
  -lc{N}: set number of literal context bits - [0, 8], default: 3
  -lp{N}: set number of literal pos bits - [0, 4], default: 0
  -pb{N}: set number of pos bits - [0, 4], default: 2
  -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, bt4b, pat2r, pat2,
              pat2h, pat3h, pat4h, hc3, hc4], default: bt4
  -eos:   write End Of Stream marker
  -si:    Read data from stdin
  -so:    Write data to stdout


ts moreutils time stamp log



make clean;make 2>&1 | tee >(ts "%H_%M_%S" > spendinglogs6.log)


https://unix.stackexchange.com/questions/26728/prepending-a-timestamp-to-each-line-of-output-from-a-command

I wish to prepend a timestamp to each line of output from a command. For example:
foo
bar
baz
would become
[2011-12-13 12:20:38] foo
[2011-12-13 12:21:32] bar
[2011-12-13 12:22:20] baz


https://stackoverflow.com/questions/39239379/add-timestamp-to-teed-output-but-not-original-output

Check out ts from the moreutils package.
If you're using bash, you can tee to a shell pipe as a file:
https://unix.stackexchange.com/questions/272433/piping-into-moreutils-ts-with-nanosecond-precision
https://manpages.debian.org/testing/moreutils/ts.1.en.html
https://rentes.github.io/unix/utilities/2015/07/27/moreutils-package/
https://joeyh.name/code/moreutils/

2018年11月1日 星期四

linux連到ssh server想要中斷連線

~.

We can use tilde-period (~.) to close an unresponsive session.

https://pleiades.ucsc.edu/hyades/SSH_Escape_Sequences

When a pseudo-terminal has been requested by the OpenSSH SSH client, ssh supports a number of functions through the use of an escape character. The escape character must always follow a newline to be interpreted as special. The default escape character is ~(tilde); but it can be can be changed in configuration files using the EscapeChar configuration directive or on the command line by the -e option.


 ~?
Supported escape sequences:
 ~.   - terminate connection (and any multiplexed sessions)
 ~B   - send a BREAK to the remote system
 ~C   - open a command line
 ~R   - request rekey
 ~V/v - decrease/increase verbosity (LogLevel)
 ~^Z  - suspend ssh
 ~#   - list forwarded connections
 ~&   - background ssh (when waiting for connections to terminate)
 ~?   - this message
 ~~   - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)