Skip to content

Instantly share code, notes, and snippets.

View PaulGoldschmidt's full-sized avatar
🎯
Focusing

Paul Goldschmidt PaulGoldschmidt

🎯
Focusing
View GitHub Profile
@PaulGoldschmidt
PaulGoldschmidt / direct-transformer.py
Last active October 19, 2024 15:54
A script to transform the keepass .csv-export to a format that is importable by the native apple password application.
import csv
import getpass
from pykeepass import PyKeePass
# Function to decrypt the KeeWeb file and transform it to CSV
def transform_kdbx_to_csv(kdbx_file, output_csv):
# Ask for KeeWeb password securely via CLI
password = getpass.getpass("Enter KeeWeb (KeePass) database password: ")
# Open the KeePass database using pykeepass
@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active November 14, 2024 18:51
Git Commit Freeze Due to GPG Lock Issues (Solution)

Git Commit Freeze Due to GPG Lock Issues

If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.

Solution Steps

1. Check for GPG Lock Messages

Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.

@lantrix
lantrix / README.md
Last active September 14, 2024 17:59
If you have unsigned commits on a branch, you can re-sign them with your GPG uploaded key. Requires GH CLI, gpg installed.

The base branch requires all commits to be signed If you need to setup GPG, you can read our helpful guide.

Then once you have:

  • gpg installed
  • GitHub CLI installed (optional but useful)
  • a key generated for your Name and email, in this example: Lantrix [email protected]
  • your gpg public key uploaded to GitHub
  • You can rebase and re-sign all the commits and force push the branch as a potential solution.
@wp-user-manager
wp-user-manager / wpum_customize_admin_email_new_user.php
Created January 9, 2020 11:13
WP User Manager - Add all custom field data the user enters on registration to the email sent to the administrator
<?php
add_filter( 'wpum_admin_registration_confirmation_email_headers', function() {
return array('Content-Type: text/html; charset=UTF-8');
});
add_filter('wpum_admin_registration_confirmation_email_message', function( $message, $user ) {
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
$message = sprintf( esc_html__( 'You have a new member application for the %s:', 'wp-user-manager' ), $blogname ) . "<br><br>";
@RadGH
RadGH / rs_upload_from_url.php
Last active October 1, 2024 08:07
Upload a file from a URL to the WordPress media gallery. Supports images, PDFs, and other file types.
<?php
/**
* This function uploads a file from a URL to the media library, designed to be placed in your own theme or plugin.
* Metadata will be generated and images will generate thumbnails automatically.
*
* HOW TO USE:
* 1. Add the function below to your theme or plugin
* 2. Call the function and provide the URL to an image or other file.
* 3. If successful, the attachment ID will be returned.
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active November 18, 2024 23:23
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@bmhatfield
bmhatfield / .profile
Last active November 14, 2024 12:11
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@rxaviers
rxaviers / gist:7360908
Last active November 18, 2024 21:28
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: