Skip to content

Instantly share code, notes, and snippets.

View dengshenkk's full-sized avatar
💭
I may be slow to respond.

dengshenkk dengshenkk

💭
I may be slow to respond.
View GitHub Profile
@eczn
eczn / mac-disable-swap.md
Created May 16, 2024 14:20
mac 禁用 swap 交换

参考自 https://github.com/digoal/blog/blob/master/202212/20221207_01.md 这里备份记录一下


第零步:关闭 SIP

SIP 会导致你即使是 root 用户也会出 operation not permitted 的情况出现,尤其是操作一些系统底层的时候(比如 nvram、系统目录/服务等)

关闭方式(只测了我的 m1 mac,需要进入恢复模式):

  1. 关机
@semlinker
semlinker / index.html
Last active June 4, 2023 07:10
Axios 取消重复请求
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Axios 取消重复请求示例</title>
<script src="https://cdn.bootcdn.net/ajax/libs/qs/6.9.6/qs.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
</head>
@vra
vra / pre-commit
Last active March 15, 2024 06:48
#!/bin/sh
hard_limit=$(git config hooks.filesizehardlimit)
soft_limit=$(git config hooks.filesizesoftlimit)
: ${hard_limit:=10000000}
: ${soft_limit:=1000000}
list_new_or_modified_files()
{
git diff --staged --name-status|sed -e '/^D/ d; /^D/! s/.\s\+//'
}
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 6, 2025 14:21
crack activate Office on mac with license file
@strathmeyer
strathmeyer / gist:4990173
Created February 19, 2013 21:31
Improve OSX Bluetooth quality
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 40
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 48
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 53
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 48
defaults write com.apple.BluetoothAudioAgent "Stream - Flush Ring on Packet Drop (editable)" 30
defaults write com.apple.BluetoothAudioAgent "Stream - Max Outstanding Packets (editable)" 15
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" "0.75"