Skip to content

Instantly share code, notes, and snippets.

View maarten1C96's full-sized avatar

Maarten maarten1C96

  • The Netherlands, Rotterdam
  • 19:02 (UTC +01:00)
View GitHub Profile
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=10
# 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
# # else push all the commits
@maarten1C96
maarten1C96 / semantic-commit-messages.md
Last active September 3, 2023 10:20 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@maarten1C96
maarten1C96 / Export-OSX-Notes-to-HTML.applescript
Created October 5, 2018 07:03
Export notes from the OSX Notes.app to separate HTML files prefixed with the creation timestamp.
on buildTitle(originalText)
set normalizedText to my replace(originalText, ":", "-")
set normalizedText to my replace(normalizedText, "|", "")
set normalizedText to my replace(normalizedText, "{", "")
set normalizedText to my replace(normalizedText, "}", "")
set finalTitle to my firstChars(normalizedText, 30)
return finalTitle
end buildTitle
on replace(originalText, fromText, toText)