Skip to content

Instantly share code, notes, and snippets.

View marcus-at-localhost's full-sized avatar
💭

Marcus marcus-at-localhost

💭
View GitHub Profile
@marcus-at-localhost
marcus-at-localhost / flipbook2pdf.js
Created July 25, 2026 13:26
open dev tools on a flipbookhtml5 thingie and paste this code into the console! Don't do it if you don't know what the code is doing! It's a security ris to copy and paste code from the internet in your browser! this is relying on `fliphtml5_pages` global variable to count the pages and this gets around CSP isuues (3rd party pdf.js script is not…
// Script d'extraction BookPreview/FlipPDFPlusPro vers PDF
// À exécuter dans la console du navigateur
// Builds PDF from JPEG bytes locally — no external libs, no CSP issues.
// based on https://github.com/arthur-mdn/ExtractJSFlipPDFPlusProToPDF/blob/main/script.js
const debug = false;
(async function () {
console.log('Starting extraction...');
@marcus-at-localhost
marcus-at-localhost / feiertage.class.php
Last active July 12, 2026 05:10
Simple German holidays helper class with DateTime Class (Deutsche Feiertage)
<?php
class Holidays
{
public static function getEaster()
{
$easter = new DateTime('now');
$year = $easter->format('Y');
$easter->setDate($year, 3, 21);
$easter->setTime(0, 0, 0);
@marcus-at-localhost
marcus-at-localhost / info.md
Last active December 28, 2025 22:42
[Fix Gallery Bank] Wordpress Plugin Gallery Bank Pro 3.x stopped working after switching to https - showing only the shortcode on website and backend is deactivated.

If you bought a license for Gallery Bank Pro https://gallery-bank.tech-banker.com/ then the license key is somehow wired to your domain with the full protocoll like: http://www.test.com. In case you want to switch to https or drop the www your license becomes invalid.

Cases and no solutions are presented here:
http://tech-banker.com/topic/ssl-addition-disables-gallery-bank-pro/
http://tech-banker.com/topic/gallery-not-showing-only-shortcodes/

Using the full domain with protocol is a very dumb or weird way to validate a license key.

The right thing to do is writing the support of Gallery Bank. They were responsive and asked to get access to my Wordpress to update Gallery Bank. No way!

@marcus-at-localhost
marcus-at-localhost / forminator-submission-date-format.php
Last active August 25, 2025 07:50 — forked from wpmudev-sls/forminator-submission-date-format.php
[Forminator] - Custom form submission date format
<?php
/**
* Plugin Name: [Forminator] - Custom form submission date format (Rev.1.1)
* Description: This MU Plugin allows the usage of a custom date format for the Submission page
* Author: Anderson Salas @ WPMUDEV
* Task: SLS-3998
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
@marcus-at-localhost
marcus-at-localhost / alpine-js-fetch-data-on-x-init.markdown
Last active June 11, 2025 14:29
[Alpine.js fetch data on `x-init`] #js #alpinejs
Updated list / Nov 17 - 2024
Posting - https://posting.sh/ - Terminal Based
ATAC - https://github.com/Julien-cpsn/ATAC
Rest.nvim - https://github.com/rest-nvim/rest.nvim
Slumber - (uses tui client) https://slumber.lucaspickering.me/
@marcus-at-localhost
marcus-at-localhost / search.md
Last active November 19, 2024 16:10
Search current site with google bookmarklet
javascript:(function(){var query=prompt('Enter search query:');if(query){var site=window.location.hostname;window.location.href='https://www.google.com/search?q=site:'+site+'+'+encodeURIComponent(query);}})();
@marcus-at-localhost
marcus-at-localhost / bootstrap-5-sass-mixins-cheat-sheet.scss
Created September 6, 2021 06:50 — forked from anschaef/bootstrap-5-sass-mixins-cheat-sheet.scss
All New Bootstrap 5 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 5 Sass Mixins [ Cheat sheet ]
// Updated to Bootstrap v5.1.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/main/scss/mixins
// @see https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss
/* -------------------------------------------------------------------------- */
// Options
// @see https://getbootstrap.com/docs/5.1/customize/options/

HTMX and Bootstrap Toasts

Just a little demo how to use bootstraps toasts component with HTMX and custom triggers. Toasts are stackable and grouped by message (so the same message doesn't pop up several times, when already open.

A Pen by Marcus at Localhost on CodePen.

License.