2018/3/22

vnc player 中文方塊字

ref: vnc subtitles

內建字幕的影片播出來是方塊字。
vnc 2.2.8

是 Subtitiles/OSD 中 Encoding 和 Font 設定的關係。
Default Encoding 是Window 123 什麼的。
把他感改成 Traditional Chinese (Big5)
Font 我選了AR PL UKai TW
設完以後,關掉重開,就可以正常顯示了。

2018/3/21

使用 rename 來rename filename ..

ref:using sed to mass rename files

結果是用 rename 這個 command..
例子是想把filename 中,4個 0 改成 3 個 00
rename s/0000/000/ F0000*
還有用這一篇:
先用 -v 看看:
rename -n -v  's/^(.{5})//' *
OK 的話,就省掉 -v:
rename 's/^(.{5})//' *

2018/3/19

build 舊版 fdisk.. 2.17..

因為新版 (2.29.2) 和bsp script 用的版本(2.17.1) 語法參數不一樣。
所以拿2.17.1來 build..

fdisk 是在kernel org, util-linux-ng 這個 project。
download 後, run .configure, make fdisk 就可以了。

fdisk 目錄下的 fdisk 只是一個 wrapper,要call fdisk/.lib/fdisk 。
所以 .lib 下的才是本體,

vpn 到中國網路

差異好像越來越大,所以...
要測試app在中國的行為,就裝 Transocks 比較快。
不用設vpn 什麼的..
iOS 版本也有喔。

console mode markdown reader

像github 的 readm 是 md 格式 (README.md)。
在 console mode 的 reader..

mdr

是用 nodejs 寫得。所以用 npm install -g mdr 就可以安裝。

使用就是
mdr  README.md



另一個是grip
一樣是console mode,但是會叫 lynx 打開。

install node.js in debian 9 - stretch

ref:How to install nodejs on debian 9 (stretch)

他說 stretch 的 nodejs package 用的 nodejs 版本太舊,不建議使用。
建議自己安裝。

文章的方法是 run deb.nordesource.com 的 script,他會邦你加入 nodejs 的 source repository,
之後就可以用 apt 安裝。

## Confirming "stretch" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_6.x/dists/stretch/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK

## Creating apt sources list file for the NodeSource Node.js v6.x LTS Boron repo...

+ echo 'deb https://deb.nodesource.com/node_6.x stretch main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_6.x stretch main' >> /etc/apt/sources.list.d/nodesource.list

...
...

## Run `apt-get install nodejs` (as root) to install Node.js v6.x LTS Boron and npm

然後 run apt-get install nodejs 就會安裝這個版本的 node.


附上其他distribution 的方法(其實一樣):nodejs package manager
在 trusty 上 run setup_6.x 的 log 中..
## Confirming "trusty" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_6.x/dists/trusty/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK

## Creating apt sources list file for the NodeSource Node.js v6.x LTS Boron repo...

+ echo 'deb https://deb.nodesource.com/node_6.x trusty main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_6.x trusty main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...
就是上面手動做的..

SoftEtnerVPN 安裝

沒有 package,所以要從 source..
git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
cd SoftEtherVPN
./configure
---------------------------------------------------------------------
SoftEther VPN for Unix

Copyright (c) SoftEther VPN Project at University of Tsukuba, Japan.
Copyright (c) Daiyuu Nobori. All Rights Reserved.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.

Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.
---------------------------------------------------------------------

Welcome to the corner-cutting configure script !

The Makefile is generated. Run 'make' to build SoftEther VPN.

看一下 Makefile...
安裝位置..
INSTALL_BINDIR=/usr/bin/
INSTALL_VPNSERVER_DIR=/usr/vpnserver/
INSTALL_VPNBRIDGE_DIR=/usr/vpnbridge/
INSTALL_VPNCLIENT_DIR=/usr/vpnclient/
INSTALL_VPNCMD_DIR=/usr/vpncmd/