Skip to content

Instantly share code, notes, and snippets.

View longshilin's full-sized avatar
🐈
Focusing

longshilin

🐈
Focusing
View GitHub Profile
@longshilin
longshilin / push.sh
Created December 26, 2022 19:06 — forked from Yash089610/push.sh
remote: fatal: pack exceeds maximum allowed size
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=500
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
@longshilin
longshilin / https-during-dev.macos.sh
Created November 21, 2021 07:13 — forked from StevenACoffman/https-during-dev.macos.sh
Use Caddy, mkcert and dnsmasq to expose your development server over HTTPS
brew install caddy mkcert nss dnsmasq
mkcert -install
# test could be anything
mkcert '*.app.test' '*.cdn.test'
# rename the certs and move them under /usr/local/etc/caddy/certs
cat <<EOF > /usr/local/etc/caddy/Caddyfile
*.app.test:443, *.cdn.test:443 {