Skip to content

Instantly share code, notes, and snippets.

View hans2103's full-sized avatar
🏠
Working from home

Hans Kuijpers hans2103

🏠
Working from home
View GitHub Profile
@hans2103
hans2103 / GTM-Tag-Custom-HTML.md
Created April 10, 2024 10:03
Cookie Consent for Google Tag Manager

GTM Tag

  • Name: Consent Mode
  • Type: Customm HTML
  • Content: code block below
  • Trigger: Consent Initialization - All Pages
<button type="button" class="cc-modal__button--settings" onclick="openCCModal('cc-accept')" aria-label="cookie settings">
    cookie
@hans2103
hans2103 / deploy.sh
Created November 16, 2022 14:57
deployment script for Magento 2
#!/bin/bash
# This script will start deployment
# $ ~/bin/deploy
# $ chmod +x ~/bin/deploy
################################################################################
# Help #
################################################################################
Help()
{
@hans2103
hans2103 / 1-setup.md
Created March 5, 2022 13:22 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@hans2103
hans2103 / rsform-preview.js
Last active December 19, 2022 12:51
RSForm Preview - can be tested with example form "RSForm! Pro Multipage example"
// Store this script in templates/<your-template>/js/rsform-preview.js
/**
* Create the Review Field based on array with questions
*
* @param formIdValue
* @param previewPageNumber
* @param totalPages
* @param validateOnChangingPage
*/
@hans2103
hans2103 / rsform-localstorage.js
Created October 15, 2021 09:44
RSForm LocalStorage
/* eslint-disable */
jQuery(document)
.ready(function ($) {
'use strict';
var form = document.getElementById('userForm');
var userForm = $('#userForm');
var formId = getFormId();
var storagePrefix = 'form' + formId + '_';
@hans2103
hans2103 / wp-mailhog-config-smtp.php
Created March 1, 2021 13:49 — forked from khalidahmada/wp-mailhog-config-smtp.php
Config Wordpress SMTP for MailHog - test your emails local
/*
* Add the MailHog to your wordpress projects
* By Khalid Ahmada
* MailHog @see https://github.com/mailhog/MailHog
*/
class WP_MAILHOG
{
function __construct()
@hans2103
hans2103 / change-location-where-mac-stores-a-screenshot
Created January 14, 2021 21:46
Change location where Mac stores a screenshot
For that, you need Terminal. Here’s how to change where screenshots are saved Mac Terminal style:
1. On your Mac, create a folder called ”Screenshots” (or anything else you like)
2. Go to Applications > Utilities and double-click on Terminal
3. Type this command: `defaults write com.apple.screencapture location`
4. Drag the “Screenshots” folder you’ve just created onto the Terminal window. You’ll see its path displayed after the command.
5. Hit Return
6. Quit Terminal
(function() {
'use strict';
var DURATION = 150;
var ringElem = null;
var movingId = 0;
var prevFocused = null;
var keyDownTime = 0;
@hans2103
hans2103 / data-type.faqpage.php
Last active August 2, 2021 14:58
Structured Data FAQ Page JLayout for Joomla
<?php
defined('_JEXEC') or die;
/**
* Example implementation
*
* $data = array();
* foreach ($this->item->faqs as $key => $faq)
@hans2103
hans2103 / slideshow.php
Created June 6, 2019 11:09
Joomla alternate layout mod_articles_category for Bootstrap 3 Slideshow
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_category
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;