2020年9月29日星期二

SpatiaLite sql

 SpatiaLite 3.0 SQL functions reference list

ST_GeometryN 

list the tables in a SQLite database file 

 SpatiaLite Cookbook

SpatiaLite database tables management with QGis 2.8 

https://github.com/qgis/QGIS/issues/37790 

SELECT * FROM sqlite_master WHERE type='table';


SELECT id, st_astext(st_centroid(st_geometryn(P.geom,1))) FROM '桥墩位置2020-09-29' as P   WHERE id < 10;


--下面的语句没有执行成功
UPDATE '桥墩位置2020-09-29' SET centroid_geom = st_centroid(st_geometryn(geom,1));

qgis

 Performing Spatial Joins (QGIS3)

Adding Radius Attribute to each Polygon in QGIS? 

Calculating the longest distance within polygon in QGIS 

http://michaelminn.com/linux/mmqgis/ 

how-to-remove-duplicate-point-features 

Nearest Neighbor Analysis (QGIS3) 

2020年9月28日星期一

aka9527

 https://www.aka9527.xyz:4433/

https://www.aka9527.xyz:7000

nginx

 Full Example Configuration

NginxDirectoryStructure  

Controlling NGINX Processes at Runtime 

Module ngx_http_core_module 

python3 http.server 

check if port is in use on Linux

check if port is in use on Linux 

sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
sudo nmap -sTU -O IP-address-Here

家庭宽带的8080端口不能从外网访问

 家庭宽带的8080端口不能从外网访问

2020年9月27日星期日

Let's Encrypt泛域名SSL证书

 Let's Encrypt泛域名SSL证书

使用acme.sh 手动生成证书(DNS手动模式) 

SSL中间证书的坑

根证书、服务器证书、用户证书的区别

域名.key是秘钥;

a.cer存储的是CA证书,

域名.cer是域名证书,

fullchain.cer是前两者的拼接;

域名.csr是证书签名请求。

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

Let’s Encrypt颁发的HTTPS证书一般包括以下几个文件:

cert.key(PEM格式):私钥文件
cert.cer(PEM格式):证书文件
fullchain.cer(PEM格式):包含证书和中间证书

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

PEM
适用于Apache、Nginx、Candy Server等Web服务器
常见的文件后缀为.pem、.crt、.cer、.key
可以存放证书或私钥,或者两者都包含
.key后缀一般只用于证书私钥文件
PFX
适用于IIS等Web服务器
常见的文件后缀为.pfx、.p12
同时包含证书和私钥,且一般有密码保护
JKS
适用于Tomcat、Weblogic、JBoss、Jetty等Web服务器
常见的文件后缀为.jks

2020年9月24日星期四

anaconda condarc socks5代理

 channels:
- defaults
# Show channel URLs when displaying what is going to be downloaded and
# in 'conda list'. The default is False.
show_channel_urls: True
allow_other_channels: True
proxy_servers:
    http: socks5://127.0.0.1:1080
    https: socks5://127.0.0.1:1080
ssl_verify: False

对数坐标

 对数坐标

【数学笔记】对数、对数坐标与分贝 

2020年9月9日星期三

Python 分段函数

 Python:Logical Masks

How to apply piecewise linear fit in Python?

numpy.piecewise 

miniconda3

2022年1月11日更新
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes
no change     /home/aka/miniconda3/condabin/conda
no change     /home/aka/miniconda3/bin/conda
no change     /home/aka/miniconda3/bin/conda-env
no change     /home/aka/miniconda3/bin/activate
no change     /home/aka/miniconda3/bin/deactivate
no change     /home/aka/miniconda3/etc/profile.d/conda.sh
no change     /home/aka/miniconda3/etc/fish/conf.d/conda.fish
no change     /home/aka/miniconda3/shell/condabin/Conda.psm1
no change     /home/aka/miniconda3/shell/condabin/conda-hook.ps1
no change     /home/aka/miniconda3/lib/python3.9/site-packages/xontrib/conda.xsh
no change     /home/aka/miniconda3/etc/profile.d/conda.csh
modified      /home/aka/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:

conda config --set auto_activate_base false

Thank you for installing Miniconda3!

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

You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:

eval "$(/home/lyq/miniconda3/bin/conda shell.YOUR_SHELL_NAME hook)"

To install conda's shell functions for easier access, first activate, then:

conda init

If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:

conda config --set auto_activate_base false

Thank you for installing Miniconda3!

Openpyxl column widths and row heights

 openpyxl读取xlsx文件,列宽度有问题,特别是连续列的宽度相同时,得到的宽度都是13。


Excel Array Formula Examples

Excel Array Formula Examples – Simple to Advanced

2020年9月6日星期日

cron

https://crontab.guru/

screen_cheat_sheets


screen_cheat_sheets

perform-commands-over-ssh-with-python

perform-commands-over-ssh-with-python

>>> import  subprocess
>>> subprocess.Popen("ssh -p {port} {user}@{host} {cmd}".format(port='2223', user='admin', host='192.168.1.1', cmd='nvram get wan0_realip_ip'), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
(b'192.36.222.246\n', b'')
 
 
或者使用
subprocess.check_output(  )

2020年9月2日星期三

扫描

想把自己的书籍扫描成PDF,什么样的扫描仪比较合适?
如何 DIY 更简易的图书扫描仪?
http://diybookscanner.org/en/intro.html

bash

BASH Programming - Introduction HOW-TO

bash-redirect-stderr-stdout/

for i in $(seq -f "%05g" 10 15)
do
  echo $i
done
 
for i in $(seq -f "%04g" 2 36)
do
    url="http://www.ttt.com/img/$i.jpg"
    echo $url
    wget $url
done
 
 
for i in $(seq 30); do echo "http://www.example.com/page$i.html" ; done | wget -i - 

install vsftpd FTP Server with TLS on Debian 10

install vsftpd FTP Server with TLS on Debian 10