Skip to content

Instantly share code, notes, and snippets.

##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
@shreve
shreve / pdfmarks
Last active February 28, 2025 20:28
Example of adding PDF metadata (bookmarks / ToC) with Ghostscript
[ /Title (Elementary Differential Equations)
/Author (Edwards & Penney)
/DOCINFO pdfmark
[ /Title (Contents)
/Page 6
/OUT pdfmark
[ /Count -8
/Title (1. First-Order Differential Equations)
@dahaha-365
dahaha-365 / lazy_script.js
Last active April 21, 2025 11:29
Clash Verge Rev 全局扩展脚本(懒人脚本配置)
/***
* Clash Verge Rev 全局扩展脚本(懒人配置)/ Mihomo Party 覆写脚本
* URL: https://gist.github.com/dahaha-365/0b8beb613f8d1ee656fe1f21e1a07959
*/
/**
* 整个脚本的总开关,在Mihomo Party使用的话,请保持为true
* true = 启用
* false = 禁用
*/