powerline配置

安装 pip install powerline-status pip show powerline-status//查看安装位置 mac 修改~/.bash_profile 最后添加一行 . /.../powerline/bindings/bash/powerline.sh 若字体有问题,则安装字体 https://github.com/powerline/fonts 配置 vim ~/.config/powerline/config.json 主题 修改后能看到git状态 { "ext": { "shell": { "theme": "default_leftonly" } } } 修改config_files 在想要使用的主题文件中可以增加一些内容 vim /.../powerline/config_files/themes/shell/__main__.json shell相关的配置可以参考 https://powerline.readthedocs.io/en/latest/configuration/segments/shell.html { "segment_data": { "hostname": { "args": { "only_if_ssh": true } }, "cwd": { "args": { "dir_limit_depth": 2, "dir_shorten_len": 10 } } } } dir_shorten_len (int) – shorten parent directory names to this length (e.……

阅读全文

css相关

css显示1/3的宽度 使用css calc() .tab { width: calc(100%/3); } refer: https://stackoverflow.com/questions/18781713/css-divide-width-100-to-3-column……

阅读全文

rclone挂载网盘到vps

https://rclone.org/onedrive/ 1. 在有图形界面的机器上面授权 下载rclone https://rclone.org/downloads/ //授权 rclone authorize "onedrive" 2. 在vps上面安装rclone curl https://rclone.org/install.sh | sudo bash 2.1 设置 rclone config //查看目录 rclone lsd drivename: 3. 挂载到vps的目录上 记得先安装fuse apt install fuse rclone mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --daemon rclone mount od:vps /root/onedrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --daemon df -h 查看挂载的网盘 config root@vultr:~/rclone# rclone config 2019/07/31 15:52:12 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n name> od(自己随意起的名字) Type of storage to configure.……

阅读全文

exiftool删除图片exif信息

exiftool下载地址 https://www.sno.phy.queensu.ca/~phil/exiftool/ 使用帮助 https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html 查看信息 exiftool filname.jpg exiftool -a -u -g1 a.jpg //查看所有信息 exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext jpg filename.JPG //查看时间 删除gps信息 exiftool -gps:all= filename.jpg 删除所有信息 exiftool -overwrite_original -all= filename.jpg ……

阅读全文

npm指定目录

使用—prefix npm start –prefix /path/to/project 参考: https://stackoverflow.com/questions/36172442/how-to-npm-start-at-a-different-directory……

阅读全文

parallelshell同时运行多个命令

安装和使用 npm i -g parallelshell # 使用 parallelshell "cmd1" "cmd2" "cmd3" 与cmd1 & cmd2 &cmd3的区别: parallelshell会结束所有的进程如果其中一个进程终止 来源: https://www.npmjs.com/package/parallelshell https://github.com/darkguy2008/parallelshell……

阅读全文

linux显示中文

查看字符编码 locale 修改字符编码 dpkg-reconfigure locales Debian and Ubuntu /etc/default/locale ssh输入中文 修改 /etc/default/locale LANG=C.UTF-8 LANGUAGE= LC_CTYPE=C.UTF-8 LC_NUMERIC="C.UTF-8" LC_TIME="C.UTF-8" LC_COLLATE="C.UTF-8" LC_MONETARY="C.UTF-8" LC_MESSAGES="C.UTF-8" LC_PAPER="C.UTF-8" LC_NAME="C.UTF-8" LC_ADDRESS="C.UTF-8" LC_TELEPHONE="C.UTF-8" LC_MEASUREMENT="C.UTF-8" LC_IDENTIFICATION="C.UTF-8" LC_ALL= 本地访问远程终端,本地的locale和远程的locale中的变量相同可以避免乱码 ……

阅读全文

使用PEM文件ssh

连接服务器 sudo chmod 600 key.pem ssh -i key.pem username@ip ssh-add key.pem ssh-add -l #显示密钥 sudo ssh-add -D #删除所有密钥 ……

阅读全文

jupyter使用xgboost服务挂掉

发生错误 OMP: Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already initialized. 1 import os os.environ['KMP_DUPLICATE_LIB_OK']='True' 2 安装nomkl conda install nomkl 参考https://github.com/dmlc/xgboost/issues/1715……

阅读全文