View 借助git快速批量转换CRLF到LF.md
借助git快速批量转换CRLF到LF
换行符的差异
- windows下每行结尾为回车+换行(CR+LF),即 \r\n
- unix和macOS下每行结尾为换行LF,即 \n
- classic macOS(最后一个版本为1999年发布的Mac OS 9,可忽略)下为回车,即 \r
设置jetbrain系IDE
settings > Editor > Code Style > Line Separator > unix and macOS (\n)
View expand-collapse.user.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a button to Collapse or Expand files in a Github Gist | |
// | |
// Install Tampermonkey and add this as a script | |
// ==UserScript== | |
// @name Github Gists: Expand / Collapse Files | |
// @namespace https://gist.github.com/Jaace/7b70d2bb19af63e10b144ed7d867eae0 | |
// @version 0.1 | |
// @description Add a button to expand or collapse files in github gists | |
// @author Jason Boyle |
View sublime_hq_patches.md
Sublime Text 3
Sublime Text 3 (Build 3211)
Windows 32-bit
Reggable using JunkPre-Regged |
---|
View trojan_mult.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
#Author: atrandys | |
# | |
# | |
function blue(){ | |
echo -e "\033[34m\033[01m$1\033[0m" | |
} | |
function green(){ | |
echo -e "\033[32m\033[01m$1\033[0m" |
View resize_image.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# 在需要转换图片的目录下运行此脚本 | |
# convert命令是ImageMagick这个图片处理软件包中的一个命令 | |
# 安装ImageMagick之后,才能使用convert命令 | |
# man convert可以查看命令用法帮助文档 | |
# 逐个将所有png,bmp,jpg格式图片文件转换为原来尺寸的1/4大并保存为jpg格式图片文件 | |
# 转换后重命名 |
View README.md
Mac下配置Aria2
安装和设置 Aria2
# 使用 Homebrew 安装 aria2
brew install aria2
# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
View Download a single file from a private GitHub repo.md
Download a single file from a private GitHub repo.
Relying on basic authentication
#
#依靠基本身份验证从github企业获取原始内容的单一代码。
#无需创建访问令牌并将其合并到url中。
#
#
#填空:
View README.MD
小米9 刷欧洲版 MIUI 固件及适当的本土化修复
本教程不保证它的权威性和正确性,也不对任何实践中的错误、数据丢失等问题负责!
本教程平台为 macOS, 其他系统请酌情参考
更新说明
@ 2020/8/29
- 添加"介绍"
- 更新 TWRP 信息
View Bytes_convert.md
To convert bytes to KB, MB, GB... for human readable
Example:
file_size=123456778
echo $file_size | awk '{ split( "B KB MB GB TB PB EB ZB YB" , v ); s=1; while( $1>1024 && s<9 ){ $1/=1024; s++ } printf "%.2f %s", $1, v[s] }'
NewerOlder