Skip to content

Instantly share code, notes, and snippets.

View haojianzong's full-sized avatar

jakehao haojianzong

View GitHub Profile
@haojianzong
haojianzong / gist:77d746a0466baa7e6543b1976e0ce8de
Last active May 26, 2024 02:21
Git tag compare generator
"""
This script fetches the two most recent, distinct semantic version tags from a Git repository
and generates a comparison URL between them, suitable for GitHub repositories.
This can help developers to quickly check their changes before releasing a Prod version.
Output of the script:
Comparison URL: https://github.com/[your-github-name]/[your-repo]/compare/4.4.2-rc1...4.4.3-rc2
"""
@haojianzong
haojianzong / UIView+Pin.swift
Created June 28, 2025 08:26
UIView+Pin.swift
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
import Foundation
import UIKit
// A small utility for NSLayoutDimension shortcuts, easily reduce lots of auto layout codes.
public protocol PinObject {