Skip to content

Instantly share code, notes, and snippets.

View jarrodparkes's full-sized avatar
🚀
Writing code!

Jarrod Parkes jarrodparkes

🚀
Writing code!
View GitHub Profile
@jarrodparkes
jarrodparkes / ExplicitNullEncodable.swift
Created December 4, 2021 02:41
ExplicitNullEncodable.swift
import Foundation
// Proposal...
/// A value that can be included in a payload (`.explicitNone` or `.some`)
/// or completely absent (`.none`). Intended for request payloads.
public enum ExplicitNullEncodable<Wrapped> {
case none
case explicitNone
case some(Wrapped)
@jarrodparkes
jarrodparkes / PULL_REQUEST_TEMPLATE.md
Created October 23, 2020 16:32
A simple template for pull requests.

Summary

[Provide a summary of the change.]

Issue

[If exists, provide a link to the corresponding JIRA issue(s).]

Code Dependencies

@jarrodparkes
jarrodparkes / release-notes.bash
Created October 13, 2020 14:59
Prints release notes by scrubbing Git commit messages that use a "[PROJECT]-[TICKET]: message" format.
#!/bin/bash
# determine branch
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# determine which commits you care about
if [ "$GIT_BRANCH" == "master" ]; then
# get commits between "tip of master" and "last tagged release"
LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
COMMITS=$(git log $LAST_TAG..master --pretty=format:"%h - %s (%an)")
@jarrodparkes
jarrodparkes / prepare-commit-msg.bash
Last active May 21, 2021 17:15
Loosely enforces a [PROJECT]-[TICKET] naming structure for Git commits based on Git branch name.
#!/bin/bash
# SOURCE: https://git-scm.com/docs/githooks
# SOURCE: https://gist.github.com/bartoszmajsak/1396344
#==================================================================================================#
# Loosely enforces a [PROJECT]-[TICKET] naming structure for Git commits based on Git branch name. #
#==================================================================================================#
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)

Keybase proof

I hereby claim:

  • I am jarrodparkes on github.
  • I am jarrodparkes (https://keybase.io/jarrodparkes) on keybase.
  • I have a public key ASABKbWStLODJEQ84j8euEWL98VOSvpGo845gLzxBXtd3go

To claim this, I am signing this object: