Skip to content

Instantly share code, notes, and snippets.

View maboloshi's full-sized avatar

沙漠之子 maboloshi

  • 01:53 (UTC +08:00)
View GitHub Profile
@maboloshi
maboloshi / MDShellExtensions_install.inf
Created April 20, 2025 14:52
基于MDShellExtensions 项目的 Markdown Preview Handler
[Version]
Signature="$Windows NT$"
[DefaultInstall.ntamd64]
AddReg=AddRegKeys
CopyFiles = Sk4dCopyFiles
[AddRegKeys]
; 关联文件扩展名与预览处理器和缩略图生成器
HKCR,".markdown\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}",,,"{2417D607-9848-4D35-9178-DC3FA975D174}"
@maboloshi
maboloshi / readme.md
Last active April 20, 2025 14:51
基于SumatraPDF的pdf, djvu, 等文件的资源管理器预览窗格预览器安装

需提取的文件

  • PdfPreview.dll
  • libmupdf.dll

安装方法

注册

基于SumatraPDF的文件预览器_install.inf -> 右键 -> 安装

卸载

基于SumatraPDF的文件预览器_uninstall.inf -> 右键 -> 安装

@maboloshi
maboloshi / ci_commit_with_signature.sh
Last active April 6, 2025 12:32
通过 GitHub GraphQL API 中的`CreateCommitOnBranch`将提交附加到给定分支。\n Attach a commit to a given branch via `CreateCommitOnBranch` in the GitHub GraphQL API.
#!/bin/bash
while getopts ":T:R:B:P:F:D:h:b:" opt; do
case $opt in
T)
# 通过 GitHub GraphQL API 进行身份验证的 TOKEN
# TOKEN for authentication via the GitHub GraphQL API
TOKEN=$OPTARG
;;
R)
@maboloshi
maboloshi / create_ref_github_api.ps1
Created December 8, 2023 03:44
通过 GitHub REST API 创建远程分支 (Powershell 原生实现)
function create_ref {
param (
[Parameter(Mandatory = $true)]
[String]$Token,
[Parameter(Mandatory = $true)]
[String]$RepoNwo,
[Parameter(Mandatory = $true)]
[String]$Ref,

借助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)

@maboloshi
maboloshi / expand-collapse.user.js
Last active October 8, 2023 06:18 — forked from Jaace/expand-collapse.user.js
TamperMonkey Script: Gist expand / collapse files.
// 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
@maboloshi
maboloshi / sublime_hq_patches.md
Created March 13, 2021 03:22
Sublime HQ Patching Guide

Sublime Text 3

Sublime Text 3 (Build 3211)

Windows 32-bit

Reggable using Junk
Pre-Regged
#!/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"
@maboloshi
maboloshi / resize_image.sh
Last active April 5, 2020 15:55
图片转换并缩小 #convert #imagemagick
#! /bin/bash
# 在需要转换图片的目录下运行此脚本
# convert命令是ImageMagick这个图片处理软件包中的一个命令
# 安装ImageMagick之后,才能使用convert命令
# man convert可以查看命令用法帮助文档
# 逐个将所有png,bmp,jpg格式图片文件转换为原来尺寸的1/4大并保存为jpg格式图片文件
# 转换后重命名