angular-matSort

angular中使用matSort对表格进行排序 https://material.angular.io/components/sort/overview <ng-container matColumnDef="start_at"> <th mat-header-cell *matHeaderCellDef mat-sort-header class="table-header"> start time </th> <td mat-cell *matCellDef="let appointment"> {{appointment.start_at|date:'yyyy-MM-dd HH:mm'}} </td> </ng-container> ''' matColumnDef="start_at"和appointment.start_at|date:'yyyy-MM-dd HH:mm'中的start_at这个变量名称要相同,不然会出现已经使用了mat-sort-header出现了箭头,点击确没有反应的情况 ……

阅读全文

sony-dpt获得root权限

https://github.com/HappyZ/dpt-tools/wiki/The-Ultimate-Rooting-Guide 测试连接是否成功 python3 dpt-tools.py =========== DPT Tools =========== Thanks for using DPT Tools. Type `help` to show this message. Supported commands: fw -- update firmware diagnosis -- enter diagnosis mode (to gain adb, su, etc.) exit/quit -- leave the tool [info] Please make sure you have charged your battery before this action. >>> Please enter the pkg file path: /Users/huweilun/FILES/test/sonydpt获取root权限/dpt-tools/fw_updater_packer_by_shankerzhiwu/pkg_example/hack_basics/fw.pkg >>> Pleae confirm /Users/huweilun/FILES/test/sonydpt获取root权限/dpt-tools/fw_updater_packer_by_shankerzhiwu/pkg_example/hack_basics/fw.pkg is the pkg file to use [yes/no]: yes >>> 获取adb权限……

阅读全文

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……

阅读全文