Skip to content

Instantly share code, notes, and snippets.

View hatimalam's full-sized avatar

Hatim Alam hatimalam

View GitHub Profile
@esimonetti
esimonetti / repair.php
Last active November 20, 2023 13:17
Sugar CLI Repair - Instance as script argument - USE TOOTHPASTE INSTEAD! https://github.com/esimonetti/toothpaste
<?php
// Enrico Simonetti
// enricosimonetti.com
//
// 2017-11-01 on Sugar 7.9.2.0
function usage($error = '') {
if (!empty($error)) print(PHP_EOL . 'Error: ' . $error . PHP_EOL);
print(' php ' . __FILE__ . ' --instance /full/path' . PHP_EOL);
@esimonetti
esimonetti / CustomSugarCacheRedis.php
Last active December 13, 2018 08:14
Custom implementation of Sugar redis cache, using authentication and persistent connection
<?php
// Enrico Simonetti
// enricosimonetti.com
//
// 2017-11-23 tested on Sugar 7.9.2.0 on PHP 7.1 with the addition of: https://gist.github.com/esimonetti/a99ea05b68cd2586949944c1b24b2921
// Custom implementation of Sugar redis cache, using authentication if configured and using persistent connections if configured
//
// file: custom/include/SugarCache/CustomSugarCacheRedis.php