Skip to content

Instantly share code, notes, and snippets.

View hofmannsven's full-sized avatar
🦖
Beast Mode

Sven hofmannsven

🦖
Beast Mode
View GitHub Profile
@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active May 8, 2025 17:41
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.

@cdsaenz
cdsaenz / index.html
Created August 19, 2022 14:11
Demo Alpine JS and Fetch from Remote API
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alpine Ajax test</title>
</head>
<body>
<h1>Users API Retrieval Test</h1>
@translate3d
translate3d / index.js
Last active March 28, 2024 09:56
Run a Node.js script directly from GitHub Gist
#!/usr/bin/env node
console.log("\n");
console.log('👋 from GitHub Gist');
console.log("\n");
@davidwebca
davidwebca / custom-wp-nav-menu-classes.php
Last active May 8, 2025 13:07
Allow adding custom classes to WordPress menu ul, li, a and at different depths. Perfect for TailwindCSS and AlpineJS usage.
<?php
/**
* WordPress filters to allow custom arguments to wp_nav_menu to,
* in turn, allow custom classes to every element of a menu.
*
* You can apply a class only to certain depth of your menu as well.
*
* The filters use the depth argument given by WordPress
* which is an index, thus starts with level 0 (zero).
*
@WaseemMansour
WaseemMansour / inc\helpers\single-related-posts.php
Last active January 3, 2025 17:24
Related Posts Without Plugins
@offroadkev
offroadkev / functions.php
Created July 20, 2018 22:05
Change Gravity Forms Spinner to CSS Spinner
// Changes Gravity Forms Ajax Spinner (next, back, submit) to a transparent image
// this allows you to target the css and create a pure css spinner like the one used below in the style.css file of this gist.
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 );
function spinner_url( $image_src, $form ) {
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder
}
@jeffochoa
jeffochoa / Response.php
Last active May 6, 2025 01:52
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@achmadfatoni
achmadfatoni / guzzle_raw_post_request.php
Created August 29, 2017 09:21
Guzzle Raw POST request
$client = new Client();
$array = [];
$res = $client->request('POST', $url, [
'body' => json_encode($array),
'headers' => [
'Content-Type' => 'application/json',
]
]);
@hofmannsven
hofmannsven / README.md
Last active January 25, 2023 10:47
Notes on Favicons, Tile Icon and Tab Icons

Favicons and more

Favicon

Install imagemagick: brew install imagemagick

Creating the .ico file with multiple sizes:

@hofmannsven
hofmannsven / README.md
Last active December 20, 2023 09:46
Notes on working with JetBrains PhpStorm IDE on macOS.