*重点(emphasis)通常显示为斜体*
`解释文字(interpreted text)通常显示为斜体`
**重点强调(strong emphasis)通常显示为粗体**
``行内文本(inline literal)通常显示为等宽文本,空格可以保留,但是换行不可以。``
章节头部由下线(也可有上线)和包含标点的标题 组合创建, 其中下线要至少等于标准文本的长度。
可以表示标题的符号有 =、-、`、:、'、"、~、^、_ 、* 、+、 #、<、> 。
对于相同的符号,有上标是一级标题,没有上标是二级标题。
标题最多分六级,可以自由组合使用。
# with overline, for parts
* with overline, for chapters
=, for sections
-, for subsections
^, for subsubsections
", for paragraphs
#!/bin/bash
JSON_FILE=~/administration.json
function children(){
local id=$1
local name="$( cat "$JSON_FILE" | jq '.[] | select(.id=="'$id'")' | jq '.name' | sed 's/"//g' )"
echo "id: $id, name: $name"
local filename="$( echo $name | sed 's/[^[:alnum:]]//g' )"
if [ ! -f "$filename.rst" ] ; then
cat > "$filename.rst" <<EOF
$name
======================================
EOF
fi
local nodes="$( cat "$JSON_FILE" | jq '.[] | select(.pId=="'$id'")' )"
if [ "x$nodes" == "x" ] ; then
return 1
fi
# if have children, create folder and toc
local foldername="$( echo $name | sed 's/[^[:alnum:]]//g' )"
local names="$( echo "$nodes" | jq ".name" | sed 's/[^[:alnum:]]//g' )"
local ids="$( echo "$nodes" | jq ".id" | sed 's/[^[:alnum:]]//g' )"
if ! grep '.. toctree::' "$foldername.rst" ; then
cat >>"$foldername.rst" <<EOF
Contents:
.. toctree::
:maxdepth: 3
:titlesonly:
:hidden:
:glob:
$( echo "$names" | sed "s#^# $foldername/#" )
EOF
fi
mkdir -p "$foldername"
pushd "$foldername"
while read cid
do
children $cid
done < <(echo "$ids")
popd
}
children a
然后执行该命令,把目录、目录索引、临时文件创建好:
12
cd ~/administration
./docs-gen.sh
然后就是把最开始转换的rst文件拷贝过来:
12345678910
cd ../administration.rst
ls | while read f ; do
filename="$(echo $f | sed 's/.rst$//' | sed 's/[^[:alnum:]]//g' ).rst" ;
find ../administration/ -name "$filename" -exec /bin/cp -f $f {} \; ;
done
#再执行一遍docs-gen.sh,把目录的索引再(确认)添加一次文件末尾
cd ../administration
./docs-gen.sh
完后生成 make html ,直接打开 _build/html/index.html 查看下内容。
winse@DESKTOP-ADH7K1Q:~/bigendian$ cat VPN-Route.bat
@setlocal enableextensions enabledelayedexpansion
@echo on
rem https://community.teamviewer.com/t5/Knowledge-Base/Are-there-parameters-to-start-TeamViewer/ta-p/4135
rem teamviewer.exe -i <ID> -P <Password> [-m fileTransfer/vpn]
start "teamviewer" "C:\Program Files (x86)\TeamViewer\TeamViewer.exe"
set teamvpnipaddr=7.138.125.65
:loop
ping -n 1 !teamvpnipaddr! | find "TTL"
if not errorlevel 1 goto :run
if errorlevel 1 goto :endloop
:endloop
ping -n 2 127.0.0.1 >nul: 2>nul:
cls
goto :loop
:run
route delete 192.168.193.0
route add 192.168.193.0 mask 255.255.255.0 !teamvpnipaddr! metric 1
endlocal
pause
参考的原文:
1234567891011121314151617181920
Hello everybody, I investigated a lot for this issue.
Establish a VPN session with TeamViewer to my home pc (remote side) and try to get access to this local network from my working place (local side).
I found an solution i never read anywhere before. Since Windows 7 has removed NAT option using netsh it is difficult to solve it with windows on board tools only.
- Install TeamViewer incl. VPN driver on both sides, activate unattended access on the remote side (my home pc). Use the button Show advanced options, and go to Advanced network options … Install VPN driver
- Install WinPkFilter Device Driver on remote side (my home pc) and restart (http://www.nat32.com/v2/install.htm Download installer: http://www.ntkernel.com/downloads/winpkflt_rtl.zip . NAT32 you don't need. This WinPkFilter package contains a simple GUI to configure the NAT between the VPN interface (client) and the remote side LAN interface (provider). see following hints ...
- Windows: Start RemoteAccess - service 'Routing an Remote Access' and set to automatic (local/remote side).
- Optional: On the remote side (my home pc), the registry has to be modified. Start the registry editor for example by Regedt32, and browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters Set the parameter IPEnableRouter to “1”. Using console or batch as admin: reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "IPEnableRouter" /t REG_DWORD /d "1". On my system it worked without this option, but according internet forums it seems to be recommended.
- Now create a remote desktop session to your home pc and start also the VPN connection within this TeamViewer session (Menu / Extras / VPN). I created a free TeamViewer account and added all pc's to my computers to make the access to my machines easier.
- On remode side (my home pc) where WinPkFilter is installed start the Internet Gateway GUI of WinPkFilter: Start / Programms / WinpkFilter / Internet Gateway. Select (double click) the ethernet adapter of your local privat lan and set NAT Status to 'Provider'. Select the TeamViewer VPN adapter and set NAT Status to 'client'. Press 'Start NAT'
- On local side (my working place) Add a route to the local side (my working place) to give access to several devices that have the same subnet, add the route like this:
route add <base IP of remote devices> mask 255.255.255.0 <IP of Teamviewer VPN on remote PC>
metric 1
Example (home lan ip range: 192.168.2.x / TeamViewer VPN IP in home pc (remote side) 7.37.88.245
route add 192.168.2.0 mask 255.255.255.0 7.37.88.245 metric 1 <ENTER>
route add 192.168.2.0 mask 255.255.255.0 7.37.88.245 metric 1 -p <ENTER> (if persistent)
Do delete the route route delete 192.168.2.0
Now you should have access to your private home network. Good luck and have fun.
The Windows Subsystem for Linux lets developers run Linux environments – including most command-line tools, utilities, and applications – directly on Windows, unmodified, without the overhead of a virtual machine.
root挂载点:C:\Users\<user>\AppData\Local\lxss or C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
winse@DESKTOP-BR4MG38:octopress$ sudo apt install make gcc -y
[sudo] password for winse:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gcc is already the newest version (4:11.2.0-1ubuntu1).
gcc set to manually installed.
make is already the newest version (4.3-4.1build1).
make set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 101 not upgraded.
winse@DESKTOP-BR4MG38:octopress$ gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: key 105BD0E739499BDB: 2 duplicate signatures removed
gpg: /home/winse/.gnupg/trustdb.gpg: trustdb created
gpg: key 105BD0E739499BDB: public key "Piotr Kuczynski <piotr.kuczynski@gmail.com>" imported
gpg: key 3804BB82D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: Total number processed: 2
gpg: imported: 2
winse@DESKTOP-BR4MG38:octopress$ curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
gpg: Signature made Sat 16 Jan 2021 02:46:22 AM CST
gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
GPG verified '/home/winse/.rvm/archives/rvm-1.29.12.tgz'
Installing RVM to /home/winse/.rvm/
RVM PATH line found in /home/winse/.bashrc.
RVM PATH line not found for Zsh, rerun this command with '--auto-dotfiles' flag to fix it.
RVM sourcing line found in /home/winse/.bash_profile.
RVM sourcing line not found for Zsh, rerun this command with '--auto-dotfiles' flag to fix it.
Installation of RVM in /home/winse/.rvm/ is almost complete:
* To start using RVM you need to run `source /home/winse/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.
👉 Donate: https://opencollective.com/rvm/donate
winse@DESKTOP-BR4MG38:octopress$
##-> @see https://github.com/rvm/rvm/issues/4764#issuecomment-624796884
Open your terminal
run /etc/apt/sources.list using vi /etc/apt/sources.list (It is possible that you can't save this file, and might get "permission denied" error. SO, in that case, open this file with sudo vi /etc/apt/sources.list)
after opening it, go to the end of file and paste this line:
deb http://security.ubuntu.com/ubuntu bionic-security main
save this file by typing :wq
now, paste this command in terminal:
sudo apt update && apt-cache policy libssl1.0-dev
You will see an update like libssl1.0-dev: Installed: (none) Candidate: 1.0.2n-1ubuntu5.3 Version table: 1.0.2n-1ubuntu5.3 500 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
then, run this command:
sudo apt-get install libssl1.0-dev
winse@DESKTOP-BR4MG38:~$ sudo apt update && apt-cache policy libssl1.0-dev
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1,162 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [998 kB]
Reading package lists... Done
W: GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
##--> @see https://askubuntu.com/questions/943539/the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-avai
winse@DESKTOP-BR4MG38:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3B4FE6ACC0B21F32
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.Ak5EisV4UJ/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3B4FE6ACC0B21F32
gpg: key 3B4FE6ACC0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
winse@DESKTOP-BR4MG38:~$ sudo apt update && apt-cache policy libssl1.0-dev
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
103 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
libssl1.0-dev:
Installed: (none)
Candidate: 1.0.2n-1ubuntu5.13
Version table:
1.0.2n-1ubuntu5.13 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
winse@DESKTOP-BR4MG38:~$ sudo apt-get install libssl1.0-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libssl1.0.0
The following NEW packages will be installed:
libssl1.0-dev libssl1.0.0
0 upgraded, 2 newly installed, 0 to remove and 103 not upgraded.
Need to get 2,455 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.ubuntu.com/ubuntu bionic-security/main amd64 libssl1.0.0 amd64 1.0.2n-1ubuntu5.13 [1,089 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security/main amd64 libssl1.0-dev amd64 1.0.2n-1ubuntu5.13 [1,366 kB]
Fetched 2,455 kB in 4s (665 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libssl1.0.0:amd64.
(Reading database ... 29956 files and directories currently installed.)
Preparing to unpack .../libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.2n-1ubuntu5.13) ...
Selecting previously unselected package libssl1.0-dev:amd64.
Preparing to unpack .../libssl1.0-dev_1.0.2n-1ubuntu5.13_amd64.deb ...
Unpacking libssl1.0-dev:amd64 (1.0.2n-1ubuntu5.13) ...
Setting up libssl1.0.0:amd64 (1.0.2n-1ubuntu5.13) ...
Setting up libssl1.0-dev:amd64 (1.0.2n-1ubuntu5.13) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
winse@DESKTOP-BR4MG38:~$
winse@DESKTOP-BR4MG38:octopress$ rvm install 2.3
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/22.04/x86_64/ruby-2.3.8.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/winse/.rvm/rubies/ruby-2.3.8, this may take a while depending on your cpu(s)...
ruby-2.3.8 - #downloading ruby-2.3.8, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13.7M 100 13.7M 0 0 3149k 0 0:00:04 0:00:04 --:--:-- 3149k
ruby-2.3.8 - #extracting ruby-2.3.8 to /home/winse/.rvm/src/ruby-2.3.8.....
ruby-2.3.8 - #configuring..........................................................
ruby-2.3.8 - #post-configuration..
ruby-2.3.8 - #compiling.............................................................................................................................................................................................................................................
ruby-2.3.8 - #installing..............
ruby-2.3.8 - #making binaries executable..
ruby-2.3.8 - #downloading rubygems-3.0.9
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 865k 100 865k 0 0 701k 0 0:00:01 0:00:01 --:--:-- 701k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.3.8 - #extracting rubygems-3.0.9.....
ruby-2.3.8 - #removing old rubygems........
ruby-2.3.8 - #installing rubygems-3.0.9................................................................
ruby-2.3.8 - #gemset created /home/winse/.rvm/gems/ruby-2.3.8@global
ruby-2.3.8 - #importing gemset /home/winse/.rvm/gemsets/global.gems..............................there was an error installing gem rubygems-bundler
.............................
ruby-2.3.8 - #generating global wrappers........
ruby-2.3.8 - #gemset created /home/winse/.rvm/gems/ruby-2.3.8
ruby-2.3.8 - #importing gemsetfile /home/winse/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.3.8 - #generating default wrappers........
ruby-2.3.8 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.3.8 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
winse@DESKTOP-BR4MG38:octopress$
winse@DESKTOP-BR4MG38:octopress$ rvm list
ruby-2.3.8 [ x86_64 ]
# Default ruby not set. Try 'rvm alias create default <ruby>'.
# => - current
# =* - current && default
# * - default
winse@DESKTOP-BR4MG38:octopress$
winse@DESKTOP-BR4MG38:octopress$ bash --login
winse@DESKTOP-BR4MG38:octopress$ rvm use 2.3.8 --default
Using /home/winse/.rvm/gems/ruby-2.3.8
##--> @see https://mirrors.tuna.tsinghua.edu.cn/help/rubygems/
winse@DESKTOP-BR4MG38:octopress$ unset HTTPS_PROXY
winse@DESKTOP-BR4MG38:octopress$ bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems
winse@DESKTOP-BR4MG38:octopress$ bundle install
Fetching source index from https://mirrors.tuna.tsinghua.edu.cn/rubygems/
Resolving dependencies...
Fetching rake 10.5.0
Installing rake 10.5.0
Fetching RedCloth 4.2.9
Installing RedCloth 4.2.9 with native extensions
Fetching bigdecimal 1.3.2
Installing bigdecimal 1.3.2 with native extensions
Fetching blankslate 2.1.2.4
Installing blankslate 2.1.2.4
Using bundler 1.17.3
Fetching timers 1.1.0
Installing timers 1.1.0
Fetching celluloid 0.15.2
Installing celluloid 0.15.2
Fetching chunky_png 1.3.1
Installing chunky_png 1.3.1
Fetching fast-stemmer 1.0.2
Installing fast-stemmer 1.0.2 with native extensions
Fetching classifier 1.3.4
Installing classifier 1.3.4
Fetching coffee-script-source 1.7.1
Installing coffee-script-source 1.7.1
Fetching execjs 2.2.1
Installing execjs 2.2.1
Fetching coffee-script 2.3.0
Installing coffee-script 2.3.0
Fetching colorator 0.1
Installing colorator 0.1
Fetching fssm 0.2.10
Installing fssm 0.2.10
Fetching sass 3.2.19
Installing sass 3.2.19
Fetching compass 0.12.6
Installing compass 0.12.6
Fetching ffi 1.9.3
Installing ffi 1.9.3 with native extensions
Fetching tilt 1.4.1
Installing tilt 1.4.1
Fetching haml 4.0.5
Installing haml 4.0.5
Fetching jekyll-coffeescript 1.0.0
Installing jekyll-coffeescript 1.0.0
Fetching jekyll-gist 1.1.0
Installing jekyll-gist 1.1.0
Fetching jekyll-paginate 1.0.0
Installing jekyll-paginate 1.0.0
Fetching jekyll-sass-converter 1.0.0
Installing jekyll-sass-converter 1.0.0
Fetching rb-fsevent 0.9.4
Installing rb-fsevent 0.9.4
Fetching rb-inotify 0.9.5
Installing rb-inotify 0.9.5
Fetching listen 2.7.9
Installing listen 2.7.9
Fetching jekyll-watch 1.0.0
Installing jekyll-watch 1.0.0
Fetching kramdown 1.4.0
Installing kramdown 1.4.0
Fetching liquid 2.6.1
Installing liquid 2.6.1
Fetching mercenary 0.3.4
Installing mercenary 0.3.4
Fetching posix-spawn 0.3.8
Installing posix-spawn 0.3.8 with native extensions
Fetching yajl-ruby 1.1.0
Installing yajl-ruby 1.1.0 with native extensions
Fetching pygments.rb 0.6.0
Installing pygments.rb 0.6.0
Fetching redcarpet 3.1.2
Installing redcarpet 3.1.2 with native extensions
Fetching safe_yaml 1.0.4
Installing safe_yaml 1.0.4
Fetching parslet 1.5.0
Installing parslet 1.5.0
Fetching toml 0.1.1
Installing toml 0.1.1
Fetching jekyll 2.1.1
Installing jekyll 2.1.1
Fetching jekyll-date-format 1.0.0
Installing jekyll-date-format 1.0.0
Fetching jekyll-page-hooks 1.3.0
Installing jekyll-page-hooks 1.3.0
Fetching jekyll-sitemap 0.5.0
Installing jekyll-sitemap 0.5.0
Fetching json 1.8.2
Installing json 1.8.2 with native extensions
Fetching rack 1.5.2
Installing rack 1.5.2
Fetching rack-protection 1.5.3
Installing rack-protection 1.5.3
Fetching rdiscount 2.1.7.1
Installing rdiscount 2.1.7.1 with native extensions
Fetching rubypants 0.2.0
Installing rubypants 0.2.0
Fetching sass-globbing 1.0.0
Installing sass-globbing 1.0.0
Fetching sinatra 1.4.5
Installing sinatra 1.4.5
Fetching stringex 1.4.0
Installing stringex 1.4.0
Bundle complete! 16 Gemfile dependencies, 50 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from haml:
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:
* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem
For more info see:
http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
winse@DESKTOP-BR4MG38:octopress$
winse@DESKTOP-BR4MG38:octopress$ rake preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 14000
/home/winse/.rvm/gems/ruby-2.3.8/gems/liquid-2.6.1/lib/liquid/htmltags.rb:43: warning: key "index0" is duplicated and overwritten on line 46
[2023-11-18 09:42:44] INFO WEBrick 1.3.1
[2023-11-18 09:42:44] INFO ruby 2.3.8 (2018-10-18) [x86_64-linux]
[2023-11-18 09:42:44] INFO WEBrick::HTTPServer#start: pid=24150 port=14000
Configuration file: /mnt/e/winsegit/octopress/_config.yml
Source: source
Destination: public
Generating...
done.