Skip to content

Instantly share code, notes, and snippets.

@adamjakab
adamjakab / 66e3cbf00b3e0d06b59f62d84f643729
Created June 11, 2015 10:04
tmp preset config for d7
preset:
title: Mekit - Minimal
description: A minimal installation preset just like D7's original
modules: ~
themes: ~
libraries: ~
configuration:
form:
site_information:
site_name:
<?php
/**
* Product Main Page
*/
/** @var Array $TV - TemplateVariables - All defined variables in this template file */
$TV = get_defined_vars();
/*
<div id="node-<?php print $TV["nid"]; ?>" class="<?php print $TV["classes"]; ?> product-full clearfix"<?php print $TV["attributes"]; ?>>
<div class="row"<?php print $TV["content_attributes"]; ?>>
@adamjakab
adamjakab / ckeditor.inc
Created December 9, 2015 14:48
WYSIWYG - fix CKEditor version(4+) check
if (preg_match('@version:[\'"](?:CKEditor )?([\d\.]+)(?:.+revision:[\'"]([\d]+))?@', $line, $version)) {
@adamjakab
adamjakab / mailtest.php
Created March 30, 2016 15:16
stream_socket_client tests for palin and ssl resources
<?php
error_reporting(E_ALL);
ini_set("display_errors",1 );
$socket_context = stream_context_create([]);
$timeout = 30;
$errno = 0;
$errstr = '';
<?php
require_once 'include/utils/progress_bar_utils.php';
/**
* Class progress_bar_utilsTest
*/
class progress_bar_utilsTest extends PHPUnit_Framework_TestCase
{
public function testprogress_bar_flush()
@adamjakab
adamjakab / mekit_barcode_feeds_processor.module
Created May 27, 2016 06:48
basic implementatio to handle barcode_field in feeds module
<?php
/**
* Enable barcode field handling for Feeds
*
* Implements hook_feeds_processor_targets_alter().
* @param array &$targets
* Array containing the targets to be offered to the user. Add to this array
* to expose additional options.
@adamjakab
adamjakab / controller.php
Created June 16, 2016 12:20
fixed AOR_Reports - addToProspectLists
/**
* Add beans to prospect list
*/
protected function action_addToProspectList() {
global $beanList;
$answer = [
'STATUS' => 'UNKNOWN',
'ERRORS' => [],
'REQUEST' => $_REQUEST,
];
@adamjakab
adamjakab / UserProfileForm.php
Created March 6, 2017 14:59
form #submit with static class method reference
<?php
/**
* Created by Adam Jakab.
* Date: 06/03/17
* Time: 12.43
*/
namespace Agora\Alter\Form\Id;
use Mekit\Drupal7\HookInterface;
@adamjakab
adamjakab / sync-to-wdcloud.sh
Created January 23, 2018 09:25
RSYNC TO NAS
#!/bin/bash
#PATHS
RSYNC="/usr/bin/rsync"
SRC="/mnt/storage/data/FOLDER_TO_BACKUP" # !!!NO TRAILING SLASH PLEASE!!!
DST="/mnt/autofs/WD-BACKUP-RW/AdamJakab/FOLDER_TO_BACKUP" # !!!NO TRAILING SLASH PLEASE!!!
# SET UP VARIABLES FOR CP
RSYNC_PATH_SRC="${SRC}/"
RSYNC_PATH_DST="${DST}/"
@adamjakab
adamjakab / InstallEssentiaEnvironment.txt
Last active March 12, 2020 17:51
Setup Essentia + Gaia environment on MacOS 13
# GAIA:
# https://github.com/MTG/gaia/blob/master/README.md
# ESSENTIA:
# https://github.com/MTG/homebrew-essentia
# https://essentia.upf.edu/installing.html
# Will create `Brewfile` wil all currently installed taps and packages
# After this process wou might want to use it it reinstall what was already there before