Skip to content

Instantly share code, notes, and snippets.

View ytlm's full-sized avatar

Tinglong Yang ytlm

View GitHub Profile
@ytlm
ytlm / set
Last active January 31, 2023 22:20
关闭安卓chrome文章推荐,还原一个干净的浏览器体验
chrome://flags/#enable-ntp-popular-sites
chrome://flags/#enable-ntp-remote-suggestions
chrome://flags/#enable-ntp-asset-download-suggestions
chrome://flags/#enable-ntp-bookmark-suggestions
chrome://flags/#enable-ntp-snippet
@ytlm
ytlm / smb.conf
Last active June 13, 2022 07:59
samb 默认配置
[share]
comment = Share Files
path = /root
valid users = root
write list = root
writeable = yes
browsable = yes
@ytlm
ytlm / bash.md
Last active October 18, 2021 10:00
bash note

if

if [ condition1 ]; then
    expression1
elif [ condition2 ]; then
    expression2
else
    expression3
fi
@ytlm
ytlm / vim.json
Created July 13, 2020 02:57
vim中json文件中双引号被隐藏的问题
```shell
:verbose set conceallevel
```
verbose命令可以查看是哪个插件设置的这个值
如果直接禁用可以设置
let g:indentLine_conceallevel = 0
```shell
autocmd FileType json,markdown let g:indentLine_conceallevel=0
@ytlm
ytlm / ffmpeg
Last active March 19, 2020 03:36
ffmpeg command record
ffmpeg -ss 00:00:03 -t 60s -i test.flv -c:v libx264 -c:a aac -strict experimental -b:a 98k out.mp4
# 从test.flv视频中的00:00:03时间点开始,截取60s时间的视频,输出为out.mp4视频文件
ffmpeg -i test.flv -strict -2 -vf crop=1920:1000:430:0 out.mp4
# 具体含义是 crop=width:height:x:y,其中 width 和 height 表示裁剪后的尺寸,x:y 表示裁剪区域的左上角坐标。将该点作为基准点,向右下进行裁剪得到输出视频。
ffmpeg -i test.flv -filter_complex transpose=1 -y out.mp4
# transpose=1为顺时针旋转90°,transpose=2逆时针旋转90°。
@ytlm
ytlm / http_header.js
Last active December 11, 2019 06:33
Pre-request Script for postman 技巧
// 生成http Date
var today = new Date()
var apiDate = today.toUTCString()
postman.setEnvironmentVariable("api-date", apiDate);
// 获取请求method
var method = request.method
@ytlm
ytlm / less.sh
Created October 11, 2019 09:41
less终端乱码
export LESS="-eirMX"
@ytlm
ytlm / fuser.sh
Created October 10, 2019 08:18
when umount device is busy
unmout /path/to/mm
fuser /path/to/mm 获得这个挂在使用的pid
@ytlm
ytlm / proxy.conf
Last active October 10, 2019 08:16
sslocal privoxy socks5 to http proxy; proxychains
sslocal
{
"server": "",
"server_port": 15938,
"method": "",
"password": "",
"local_address": "127.0.0.1",
"local_port": 8700
}
@ytlm
ytlm / docker.sh
Last active April 17, 2019 12:39
非root用户使用docker命令
sudo groupadd docker
sudo gpasswd -a ${USER} docker || sudo usermod -aG docker ${USER}
sudo systemctl restart docker
sudo chmod a+rw /var/run/docker.sock
# 退出当前用户重新进来,就可以用非root用户使用docker命令