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 / 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)
@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 / 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 / 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 / extractPagesFromPDF.sh
Last active February 1, 2025 12:03
Extract each page from pdf files in the current directory in a sigle file
#!/bin/bash
# This script will extract each page from pdf files in the current directory in a sigle file
#
# MIT License
# Copyright (c) 2025 Lumen Freitas <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files.
I=1

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@lumenpink
lumenpink / webmention.php
Created February 20, 2023 20:57 — forked from otherjoel/webmention.php
Add simple file logging
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
#
# Webmention Emailer
# ------------------
#
# An incremental evolution of Jeremy Keith's "minimum viable" webmention,
# I've added some minimal code to have webmentions emailed to an address
@lumenpink
lumenpink / Doctrine-Multi-Tenancy.md
Created July 13, 2021 18:27 — forked from CarlosEduardo/Doctrine-Multi-Tenancy.md
Multi-Tenancy (tenant) Strategy for Doctrine ORM
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Authorization');
if(isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/plain') !== false) {
$format = 'text';
} else {
header('Content-Type: application/json');
$format = 'json';
}