Skip to content

Instantly share code, notes, and snippets.

View lumenpink's full-sized avatar
🏠
Starting a fresh project

Lumen Lohn lumenpink

🏠
Starting a fresh project
View GitHub Profile
@lumenpink
lumenpink / HTML_UnEncode.sql
Created February 10, 2025 15:06 — forked from arnisjuraga/HTML_UnEncode.sql
Convert HTML entities to HTML code in MySQL
/*
Function converts encoded HTML entities back to HTML tags in pure MySQL
-- Original method: https://stackoverflow.com/a/41460016/1720476
-- @Balmiopour comment added https://stackoverflow.com/questions/3678980/is-there-a-mysql-function-to-decode-html-entities#comment71742861_41460016
Version history:
@lumenpink
lumenpink / description.md
Last active February 22, 2025 01:22
Git Hook Scripts for Versioning and Changelog Generation

Git Hook Scripts for Versioning and Changelog Generation

This repository contains two Git hook scripts designed to automate versioning and changelog generation based on commit messages. These scripts are intended to be used as Git hooks to streamline your development workflow.

Scripts Overview

post-commit

  • If the commit message contains a version tag (ver:X.Y.Z or ver:X.Y), it uses that version, creates a Git tag with the specified version and optionally pushes the tag to the remote repository.
  • If no version tag is found, it generates a version number based on the latest tag, the number of commits since that tag, the commit timestamp, and the commit hash.
@lumenpink
lumenpink / ..git-commit-status - Generate git commit message from git-status.md
Created February 21, 2025 19:12 — forked from erikw/..git-commit-status - Generate git commit message from git-status.md
Generate git commit message from git-status. Will generate a commit message like "Added: file1.py file2.py file3.py Modified: file4.py file5.py Deleted: README.md Renamed: test.txt-> test2.txt". Put this in your .gitconfig.

git commit-status alias

An alias that will generate a git commit message staged changes as shown in git-status. Put this alias (section below) in your .gitconfig.

The message generated will be in the format of:

$ git status --porcelain
A file1.py
A file2.py
A file3.py
@lumenpink
lumenpink / update_composer.sh
Created February 24, 2025 17:00
One-liner to update all composer packages to last version
composer require $(composer show -s --format=json | jq '.requires | keys | map(.+" ") | add' -r)