Skip to content

Instantly share code, notes, and snippets.

View esimonetti's full-sized avatar
Open to new opportunities

Enrico Simonetti esimonetti

Open to new opportunities
View GitHub Profile
hectorrios / mapNewFields.php
Last active June 18, 2020 08:29
extend the modules/Leads/clients/base/layouts/convert-main.php layout via the Extension Framework
View mapNewFields.php
//File: /custom/Extension/modules/Leads/Ext/clients/base/layouts/convert-main/mapNewFields.php
//One Gotcha with this, this file will be required
//when metadata is being rebuilt and so you must avoid defining the following
//variable names here: $module and $type
//Doing so will override those variables in the MetaDatFiles parser and cause
//un-expected results.
maxkostinevich / dev.yml
Last active January 27, 2024 07:33
Github Actions - Deploy Serverless Framework (AWS)
View dev.yml
# Github Actions for Serverless Framework
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
# Learn more:
ServerlessBot / IAMCredentials.json
Last active December 20, 2023 16:50
Minimum credential set for Serverless Framework
View IAMCredentials.json
"Statement": [
"Action": [
hectorrios / PostalCodeValidator.js
Last active March 18, 2020 03:46
Example of a SugarCRM sidecar Plugin that "mixes in" a keydown event listener for all postal code fields and makes a call to an Sugar REST endpoint to retrieve City name
View PostalCodeValidator.js
(function (app) {"app:init", function () {
* This plugin allows views that contain *_postalcode attributes
* to be wired up with a keypress event that will contact a postal-code validator
* service
* <pre><code>
* {
* //Sample component
cmabastar / docker-compose.diff
Last active January 14, 2020 02:40
View docker-compose.diff
diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml
index c45ae579..c47fcf14 100644
--- a/backend/docker-compose.yml
+++ b/backend/docker-compose.yml
@@ -46,6 +46,9 @@ services:
- new_db
- redis
# - corenlp
+ networks:
+ - default
morozov / format-stmt.php
Created August 18, 2017 22:51
Prepared Statements Debugging Snippets
View format-stmt.php
function format_sugar_query(SugarQuery $query)
return format_builder(
function format_builder(\Doctrine\DBAL\Query\QueryBuilder $builder)
jhoffmann / SugarCronFilteredJobs.php
Last active November 7, 2019 08:46
Both files go into custom/include/SugarQueue, then run a Repair to regenerate cache/file_map.php and you're good to go.
View SugarCronFilteredJobs.php
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
require_once 'include/SugarQueue/SugarCronJobs.php';
require_once 'custom/include/SugarQueue/SugarJobFilteredQueue.php';
// Sample configuration:
elchele / FakeLinkApi.php
Last active August 24, 2017 04:25
Customization for pulling external/ad-hoc data into a Sugar subpanel
View FakeLinkApi.php
/* File: ./custom/clients/base/api/FakeLinkApi.php */
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class FakeLinkApi extends SugarApi {
public function registerApiRest() {
return array(
'filterRelatedRecords' => array(
amusarra / HasUserRoleNameExpression.php
Last active May 1, 2019 04:50
SugarCRM 7: How to make certain fields readonly
View HasUserRoleNameExpression.php
* Project: SugarCRM Logic Expression for checking User role
* Original Dev: Antonio Musarra, January 2014
* @2009-2014 Antonio Musarra <antonio.musarra[at]>
* Desc: SugarCRM Logic Expression ext class
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by