Skip to content

Instantly share code, notes, and snippets.

View RCheesley's full-sized avatar
🚀
Working on all things Mautic

Ruth Cheesley RCheesley

🚀
Working on all things Mautic
View GitHub Profile
@bavington
bavington / Site-Search-JSON+LD.html
Last active February 24, 2016 09:05
Simple JSON+LD Boilerplate for configuring your Site Name and Google Sitelinks Search Box Schema.
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
// Include your Site name within Google Search Results
"name" : "James' Donuts",
"alternateName" : "James' Donuts Ltd",
"url": "https://www.jamesdonuts.co.uk",
// Enabe the Google Sitelinks Search Box
@Yame-
Yame- / mautic-builder-active.js
Last active August 15, 2016 12:20
Checking if a Mautic theme (Landing page or E-mail) is being edited through the Builder.
// Checking if we are editting in the Mautic Builder.
if( $('.builder-active', window.parent.document).length ) {
// Do stuff here
}
@k127
k127 / page.html.php
Created August 19, 2016 12:00
A simple minimal example for preprocessing PHP template data
<?php
// We just preprocess some data to use for the template.
// For what we want to show, it is not important what we're doing here exactly,
// rather than the fact that this cannot be done inside a Twig template,
// which is where this PHP HTML template should be convertet to.
if ($image = filter_input(INPUT_GET, 'image') &&
!filter_var($image, FILTER_VALIDATE_URL) === false) {
$image_src = $image;
@abs
abs / gist:c0d598996870dda719b3
Last active November 28, 2016 22:14
Downloads and installs the startssl CA certs into the global Java keystore
#!/bin/sh
#
# Downloads and installs the startssl CA certs into the global java keystore
# Author: Klaus Reimer <k@ailis.de>
#
# Check if JAVA_HOME is set
if [ "$JAVA_HOME" = "" ]
then
echo "ERROR: JAVA_HOME must be set."
@redox
redox / base.html.haml
Last active May 16, 2020 13:13
Algolia extends HipChat to customer support
#chat-box.ubuntu.hidden-xs
.closed
.pull-right
= link_to_function content_tag(:i, nil, class: 'glyphicon glyphicon-chevron-up').html_safe, 'chat.show()'
.m-l-small
= link_to_function 'Chat with us', 'chat.show()'
.opened{style: 'display: none'}
.header
.pull-right
= link_to_function content_tag(:i, nil, class: 'glyphicon glyphicon-plus-sign').html_safe, 'chat.maximize()', class: 'maximize', style: 'display: none'
@opencoca
opencoca / mautic_warmup.sh
Created March 18, 2020 13:36
Mautic Perms and Cache warm up
cd /var/www/mautic
mkdir app/spool/
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
@thanashyam
thanashyam / sso_login_freshdesk.php
Last active November 22, 2022 23:26
SSO Login for Freshdesk support portal - PHP Sample Code (Updated)
<?php
define('FRESHDESK_SHARED_SECRET','____Place your Single Sign On Shared Secret here_____');
define('FRESHDESK_BASE_URL','http://{{your-account}}.freshdesk.com/'); //With Trailing slashes
function getSSOUrl($strName, $strEmail) {
$timestamp = time();
$to_be_hashed = $strName . FRESHDESK_SHARED_SECRET . $strEmail . $timestamp;
$hash = hash_hmac('md5', $to_be_hashed, FRESHDESK_SHARED_SECRET);
return FRESHDESK_BASE_URL."login/sso/?name=".urlencode($strName)."&email=".urlencode($strEmail)."&timestamp=".$timestamp."&hash=".$hash;
}

Dropsolid Personalisation 1 on 1

Required

php working preferrably composer working too

Installation

Install drupal

mkdir drupal && cd drupal && curl -sSL https://www.drupal.org/download-latest/tar.gz | tar -xz --strip-components=1

@molaschi
molaschi / stash_slack_integration.md
Created June 4, 2014 17:10
Integrate Stash with Slack using webhooks

This is a short article on how we integrate stash and slack in openmind

First of all i assume you have:

  • a working stash installation
  • a repository you to notify slack on pushes
  • stash user with administration priviledges
  • full access to the server (linux) where stash is installed on
  • a team configured on slack
  • slack user with administration priviledges
@bbendick
bbendick / YearCompass.md
Created December 18, 2023 00:34
YearCompass

README

This is a markdown version of the wonderful YearCompass booklet.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.

Welcome

What is this?

It's a YearCompass--your very own YearCompass, to be exact.

It is a booklet that helps you reflect on the past year and plan the next one. With a set of carefully selected questions and exercises, YearCompass helps you uncover your patterns and design a great year for yourself.