Skip to content

Instantly share code, notes, and snippets.

View zmes50416's full-sized avatar

Dean zmes50416

  • Taiwan
View GitHub Profile
@nauar
nauar / pre-receive
Last active March 13, 2024 08:45
GIT pre-receive hook for checking file size and filename extensions
#!/bin/bash
# This script is a pre-receive hook allowing pushes whose every file:
# - is smaller than 20 M
# - and its extension is not one of the following:
# - dll
# - exe
# - war
# - ear
# - jar
@ssebastianj
ssebastianj / bindkey.md
Last active December 26, 2023 06:34
zsh bindkey commands
Shortcut Action
CTRL+@ set-mark-command
CTRL+A beginning-of-line
CTRL+B backward-char
CTRL+D delete-char-or-list
CTRL+E end-of-line
CTRL+F forward-char
CTRL+G send-break
CTRL+H backward-delete-char
@karlhorky
karlhorky / pr.md
Last active November 2, 2023 13:44 — forked from piscisaureus/pr.md
Fetch all GitHub pull requests to local tracking branches

NOTE

You may not need local branches for all pull requests in a repo.

To fetch only the ref of a single pull request that you need, use this:

git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: