2018年5月30日 星期三

vimdiff 展開 收起 diff sections



https://stackoverflow.com/questions/5288875/how-to-expand-collapse-a-diff-sections-in-vimdiff



Keyboard Shortcuts:

d o Get changes from other window into the current window.

d p Put the changes from current window into the other window.

] c Jump to the next change.

[ c Jump to the previous change.


CTRL+W, w - Switch to the other split window
(CTRL+W, CTRL+W does the same thing, in case you let go of the CTRL key a bit later)



:diffupdate :diffu -> recalculate the diff, useful when after making several changes vim's isn't showing minimal changes anymore. Note that it only works if the files have been modified inside vimdiff. Otherwise, use:

    :e to reload the files if they have been modified outside of vimdiff.


:set noscrollbind -> temporarily disable simultaneous scrolling on both buffers, reenable by
:set scrollbind and scrolling.



Most of what you asked for is folding: vim user manual's chapter on folding. Outside of diffs I sometime use:

    zo -> open fold. 或是按方向右鍵
    zc -> close fold.

But you'll probably be better served by:

    zr -> reducing folding level.
    zm -> one more folding level, please.

or even:

    zR -> Reduce completely the folding, I said!.
    zM -> fold Most!.

2018年3月12日 星期一

兒童安全後靠背 - 機車

駿成 新北 永和 永利路25號 02-29223523
一~六 9:00 - 19:00
2點式 + 頭枕 3500



慶昇 桃園 中正五街241號 03-3365098

2018年2月25日 星期日

【漢字擷趣】從十分到十二萬分



有個外國留學生感嘆道:「漢語真是博大精深。我發現漢語喜歡用數字表示程度,例如十分、十二分、萬分、十二萬分,這幾個詞都表示非常、尤其。這幾個數字相差很大,漢語裡它們卻成了同義詞,有了一個神奇的等式,十分=十二分=萬分=十二萬分。真是把我們這些老外搞糊塗了。」


http://blog.xuite.net/yesfunday/blog/129962531-%E5%BE%9E%E5%8D%81%E5%88%86%E5%88%B0%E5%8D%81%E4%BA%8C%E8%90%AC%E5%88%86

http://www.merit-times.com/NewsPage.aspx?unid=274746

2018年2月4日 星期日

fb facebook 影片下載 youtube 影片 下載

youtube 影片 下載

https://www.onlinevideoconverter.com/


https://www.youtubeto.com/zh/

fb facebook 影片下載

https://www.fbdown.net/

2018年1月11日 星期四

ipsec vpn notes strongswan

IPSec VPN Host to Host on Ubuntu 14.04 with strongSwan
by gyp on June 5, 2015 in Computers, internet with 25 Comments


https://www.gypthecat.com/ipsec-vpn-host-to-host-on-ubuntu-14-04-with-strongswan



IPsec Transport Mode with strongswan on Debian 8 Jessie
Posted by Christoph Haas on 10 03 2016. 1 Kommentar zu IPsec Transport Mode with strongswan on Debian 8 Jessie

Today I am going to write a small tutorial on how inter-server communication can be secured via IPsec in transport mode. This tutorial was written for Debian 8 Jessie but it should work similar with other linux distributions aswell.


https://blog.sprinternet.at/2016/03/ipsec-transport-mode-with-strongswan-on-debian-jessie/


strongswan

auto=add (manually or by remote peer)

auto=start (automatically immediately start connect to the remote host configured in right)

2017年12月29日 星期五

手邊的 隨身碟 記憶卡 測寫入速度


Tcell 冠元 熱血紅taiwan 256GB  usb 3.0

@usb 3.0 port
dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4190109696 bytes (4.2 GB, 3.9 GiB) copied, 33.0096 s, 127 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 48.3688 s, 86.7 MB/s

@usb 2.0 port
dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4156555264 bytes (4.2 GB, 3.9 GiB) copied, 67.0075 s, 62.0 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 99.072 s, 42.3 MB/s

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

apacer 宇瞻 小白藍 8GB ah139 usb 2.0 星願碟

➜  testmount dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=prog
ress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 450.658 s, 9.3 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 1240.34 s, 3.4 MB/s


➜  testmount dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 448.361 s, 9.4 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 1354.97 s, 3.1 MB/s

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

adata ud320 16gb usb2.0 黑色 體積超小


➜  testmount dd if=/dev/zero of=test2.abc conv=noerror,notrunc,fdatasync bs=4M status=pro
gress count=1000
4190109696 bytes (4.2 GB, 3.9 GiB) copied, 104.102 s, 40.2 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 453.739 s, 9.2 MB/s



➜  testmount dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=pro
gress count=1000
4181721088 bytes (4.2 GB, 3.9 GiB) copied, 101.13 s, 41.4 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 467.83 s, 9.0 MB/s

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
雙頭 8GB usb 小黑 apacer ah175
root@ubuntu-test:~/mount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4160749568 bytes (4.2 GB, 3.9 GiB) copied, 674.002 s, 6.2 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 757.385 s, 5.5 MB/s


root@ubuntu-test:~/mount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 664.349 s, 6.3 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 779.782 s, 5.4 MB/s


 mount dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M stat
us=progress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 355.148 s, 11.8 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 958.58 s, 4.4 MB/s



-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

16gb usb 小藍 apacer ah111
root@ubuntu-test:~/mount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4190109696 bytes (4.2 GB, 3.9 GiB) copied, 360.015 s, 11.6 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 503.556 s, 8.3 MB/s


root@ubuntu-test:~/mount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4190109696 bytes (4.2 GB, 3.9 GiB) copied, 365.011 s, 11.5 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 514.878 s, 8.1 MB/s

root@ubuntu-test:~/test_mount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4164943872 bytes (4.2 GB, 3.9 GiB) copied, 231.232 s, 18.0 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 312.687 s, 13.4 MB/s
root@ubuntu-test:~/test_mount# ls
test.abc
root@ubuntu-test:~/test_mount# rm test.abc
root@ubuntu-test:~/test_mount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4160749568 bytes (4.2 GB, 3.9 GiB) copied, 221.091 s, 18.8 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 310.828 s, 13.5 MB/s


mount dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M stat
us=progress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 229.064 s, 18.3 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 892.673 s, 4.7 MB/s



-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Apacer AH333-16GB usb2.0帽蓋系列隨身碟 白色


➜  testmount dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=prog
ress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 512.863 s, 8.2 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 1976.84 s, 2.1 MB/s

➜  testmount dd if=/dev/zero of=test2.abc conv=noerror,notrunc,fdatasync bs=4M status=pro
gress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 487.709 s, 8.6 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 2019.2 s, 2.1 MB/s


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

a-data 16gb 黑色 體積超小

root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4190109696 bytes (4.2 GB, 3.9 GiB) copied, 210.143 s, 19.9 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 255.666 s, 16.4 MB/s


dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=1000
4190109696 bytes (4.2 GB, 3.9 GiB) copied, 202.203 s, 20.7 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 202.418 s, 20.7 MB/s


a-data 8GB 白色 外觀有破

dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4185915392 bytes (4.2 GB, 3.9 GiB) copied, 274.134 s, 15.3 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 428.303 s, 9.8 MB/s

root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=1600
6702497792 bytes (6.7 GB, 6.2 GiB) copied, 461.284 s, 14.5 MB/s
1600+0 records in
1600+0 records out
6710886400 bytes (6.7 GB, 6.2 GiB) copied, 461.872 s, 14.5 MB/s

dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 337.014 s, 12.4 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 478.91 s, 8.8 MB/s

dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4190109696 bytes (4.2 GB, 3.9 GiB) copied, 278.267 s, 15.1 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 403.847 s, 10.4 MB/s

2GB 深藍色 長形

dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=468
1962934272 bytes (2.0 GB, 1.8 GiB) copied, 177.234 s, 11.1 MB/s
468+0 records in
468+0 records out
1962934272 bytes (2.0 GB, 1.8 GiB) copied, 239.418 s, 8.2 MB/s

dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=450
1883242496 bytes (1.9 GB, 1.8 GiB) copied, 189.464 s, 9.9 MB/s
450+0 records in
450+0 records out
1887436800 bytes (1.9 GB, 1.8 GiB) copied, 189.988 s, 9.9 MB/s


keysight 1GB-白色
root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=239
1002438656 bytes (1.0 GB, 956 MiB) copied, 79.4018 s, 12.6 MB/s
239+0 records in
239+0 records out
1002438656 bytes (1.0 GB, 956 MiB) copied, 79.4019 s, 12.6 MB/s

root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=239 oflag=dsync
1002438656 bytes (1.0 GB, 956 MiB) copied, 141.13 s, 7.1 MB/s
239+0 records in
239+0 records out
1002438656 bytes (1.0 GB, 956 MiB) copied, 141.13 s, 7.1 MB/s


dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=239
998244352 bytes (998 MB, 952 MiB) copied, 79.1005 s, 12.6 MB/s
239+0 records in
239+0 records out
1002438656 bytes (1.0 GB, 956 MiB) copied, 144.227 s, 7.0 MB/s


群聯 紀念品 小8gb
root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=1700
4290772992 bytes (4.3 GB, 4.0 GiB) copied, 622.475 s, 6.9 MB/s
dd: error writing 'test.abc': File too large
1024+0 records in
1023+0 records out
4294967295 bytes (4.3 GB, 4.0 GiB) copied, 623.138 s, 6.9 MB/s



apacer 雙頭 8GB
root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 684.58 s, 6.1 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 684.58 s, 6.1 MB/s

Apacer 淡藍/白色 8GB隨身碟
root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=1000
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 938.987 s, 4.5 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 1043.11 s, 4.0 MB/s


apacer 白色16gb
root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=1023
4290772992 bytes (4.3 GB, 4.0 GiB) copied, 1025.77 s, 4.2 MB/s
1023+0 records in
1023+0 records out
4290772992 bytes (4.3 GB, 4.0 GiB) copied, 1025.77 s, 4.2 MB/s


4GB 聯邦銀行 機器人
dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=900
3774873600 bytes (3.8 GB, 3.5 GiB) copied, 1012.46 s, 3.7 MB/s
900+0 records in
900+0 records out
3774873600 bytes (3.8 GB, 3.5 GiB) copied, 1012.46 s, 3.7 MB/s

491MB 白隨身碟
dd if=/dev/zero of=test.abc conv=noerror,notrunc,fdatasync bs=4M status=progress count=121
507510784 bytes (508 MB, 484 MiB) copied, 14.2956 s, 35.5 MB/s
121+0 records in
121+0 records out
507510784 bytes (508 MB, 484 MiB) copied, 209.017 s, 2.4 MB/s



32G 高速卡
root@debianjwsyu:~/testmount# dd if=/dev/zero of=test.abc conv=noerror,notrunc bs=4M status=progress count=1023
4286578688 bytes (4.3 GB, 4.0 GiB) copied, 167.071 s, 25.7 MB/s
1023+0 records in
1023+0 records out
4290772992 bytes (4.3 GB, 4.0 GiB) copied, 167.24 s, 25.7 MB/s


2017年12月1日 星期五

debian 9 build code notes embedded linux openwrt





sudo dpkg-reconfigure dash
選擇 No 把 dash 關掉再試試看


samba vim lib32z1 make build-essential gcc git libssl-dev lrzsz
libncurses5-dbg libncurses5-dev libncursesw5-dbg libncursesw5-dev
bison flex iperf3 tmux ctags openssh-server openssh-sftp-server



aptitude install libc6-i386 libc6-dev-i386

aptitude install zlib1g-i386


dash / bash
http://www.jianshu.com/p/762d4cccee7e

https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=23963

---------------------------
openssh server

/etc/ssh/sshd_config


UseDNS no


# Ciphers and keying
#RekeyLimit default none
Ciphers aes128-cbc
MACs hmac-md5-96,hmac-sha1-96

----------
linux crc32 計算

cksfv

apt-get install cksfv

example

cksfv fpga_test_newmpm.bin


; Generated by cksfv v1.3.14 on 2017-12-18 at 15:46.58
; Project web site: http://www.iki.fi/shd/foss/cksfv/
;
;        22516  15:50.29 2017-02-07 fpga_test_newmpm.bin
fpga_test_newmpm.bin 9E9268D9