This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// custom/logichooks/modules/Users/afterLoginUsers.php | |
class afterLoginUsers | |
{ | |
public function callAfterLogin($bean, $event, $args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// custom/logichooks/application/afterEntryPoint.php | |
class afterEntryPoint | |
{ | |
public function disableActivityStream($event, $arguments) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// | |
// 2016-05-08 on Sugar 7.7.0.0 | |
// file: custom/data/acl/SugarACLLock.php | |
// | |
// ACL to lock record in certain conditions. Always allow admin users and specific user ids |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// | |
// 2015-09-10 on Sugar 7.6.0.0 | |
// filename: custom/data/acl/SugarACLReadOnly.php | |
// | |
// Read only ACL except for Admin users and specific user ids |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <EEPROM.h> | |
#include <EasyButton.h> | |
#include <LiquidCrystal.h> | |
#include <dht.h> | |
// board led | |
const int board_led = 13; | |
// eeprom value | |
byte eeprom_value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
// Enrico Simonetti | |
// | |
// | |
// Description: | |
// Modify Users REST API to retrieve all Users/Employees | |
// The system normally allows retrieve of records with status or employee_status='Active' and with portal_only='0' | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assuming that $b is a valid bean instance... | |
// Assuming we are editing the record... | |
// On SugarApiException($app_strings[$error_app_label], null, null, 422, 'my_error_code_sample'); | |
// "my_error_code_sample" is displayed on the output as "error" | |
// $app_strings[$error_app_label] is displayed on the output as "error_message" | |
$error_app_label = 'LBL_MY_ERROR_MESSAGE'; | |
if(!empty($b->module_name) && isModuleBWC($b->module_name)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int motorpin = 5; | |
int motor_speed = 0; | |
void setup() | |
{ | |
Serial.begin(57600); | |
pinMode(motorpin, OUTPUT); | |
} | |
void loop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int motorpin = 5; | |
const int divider = 3; | |
int motor_speed = 0; | |
void setup() | |
{ | |
Serial.begin(57600); | |
pinMode(motorpin, OUTPUT); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// 11/09/2014 | |
// Tested on SugarCRM 6.5.17 | |
// Create standard Inbound Email to Case functionality, using by default an empty team ($inbound_cases_team) for round robin assignment | |
// Then define the custom assignment rules | |
/* | |
Logic hook entries will look something like this... if entered manually |