Skip to content

Instantly share code, notes, and snippets.

View enreeco's full-sized avatar
☁️
Salesforcing...

Enrico Murru enreeco

☁️
Salesforcing...
View GitHub Profile
@scottbcovert
scottbcovert / !Queueable Apex
Last active October 15, 2024 22:06
Gist of Centralized Async Handling via Queueable Apex; for accompanying presentation see http://scottbcovert.github.io/queueable-apex NOTE: The following source alone will not compile as it is one piece of a larger Force.com development framework available at https://github.com/scottbcovert/Centralized-Salesforce-Dev-Framework
Gist of Centralized Async Handling via Queueable Apex
For accompanying presentation see http://scottbcovert.github.io/queueable-apex
NOTE: The following source alone will not compile as it is one piece of a larger Force.com development framework available at https://github.com/scottbcovert/Centralized-Salesforce-Dev-Framework
@runspired
runspired / form.html
Created May 23, 2016 13:46
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
@tommyilpazzo
tommyilpazzo / ObjectTrigger.trigger
Last active May 6, 2017 18:13
SFDC: Object Trigger
/**
* Trigger on Object
*
* @author Tommaso Bolis
* @version 1.0
* @code 001
*/
trigger ObjectTrigger on Object (after delete, after insert, after undelete, after update, before delete, before insert, before update) {
objectTriggerHandler handler = new objectHandler();
@tommyilpazzo
tommyilpazzo / ObjectTriggerHandler.cls
Last active May 8, 2017 09:04
SFDC: Object Trigger Handler
/**
* Handler for Object Trigger
*
* @author Tommaso Bolis
* @version 1.0
* @code 001
*/
public with sharing class ObjectTriggerHandler {
private boolean m_isExecuting = false;
@ChadKillingsworth
ChadKillingsworth / e2e-shadowdom.md
Last active July 6, 2023 06:54
Selenium Testing with Shadow DOM

End-to-end Testing with Shadow DOM

As the web component specs continue to be developed, there has been little information on how to test them. In particular the /deep/ combinator has been deprecated in Shadow DOM 1.0. This is particularly painful since most end-to-end testing frameworks rely on elements being discoverable by XPath or calls to querySelector. Elements in Shadow DOM are selectable by neither.

WebDriver.io

Webdriver.io has the standard actions by selectors, but also allows browser executable scripts to return an element

@tommyilpazzo
tommyilpazzo / ApexClassDocHeader.apex
Last active May 6, 2017 18:13
SFDC: Apex class documentation header template
/**
* Class description
*
* @author Tommaso Bolis
* @version 1.0
* @description Class description
* @testedIn ClassNameTest
* @uses Class1, Class2
* @code
* @history
@pingud98
pingud98 / DUEUniqueID
Created December 4, 2016 16:59
How to get the Unique ID from an Arduino DUE board
/* Code borrowed from http://forum.arduino.cc/index.php?topic=289190.0
Awesome work Mark T!*/
__attribute__ ((section (".ramfunc")))
void _EEFC_ReadUniqueID( unsigned int * pdwUniqueID )
{
unsigned int status ;
@enreeco
enreeco / Apex_Sobject_member_to_null.cls
Last active March 13, 2017 19:02
Apex class behavior with Null instance of Sobject
/*
MyController cnt = new MyController();
cnt.tst.Name = 'test';
cnt.tst = null;
system.debug('Test outside: '+(cnt.tst.Name == null)); //Test outside: true
system.debug('Test outside: '+(cnt.tst == null)); //Test outside: true
system.debug('Test outside: '+json.serializepretty(cnt.tst)); //Test outside: null
cnt.myMethod(); //Throws null pointer exceptions
*/
public class MyController {
{
"replacements": {
"remove_empty_lines": {
"find": "^\\s*\n",
"replace": "",
"greedy": true,
"case": false
},
"add_empty_line_after_open_curly_bracket": {
"find": "\\{\n",
@tommyilpazzo
tommyilpazzo / Default.sublime-commands
Last active May 8, 2017 09:03
Sublime: RegReplace Commands
[
{
"caption": "Reg Replace: Apex Format All",
"command": "reg_replace",
"args": {
"replacements": [
"remove_empty_lines",
"add_empty_line_after_open_curly_bracket",
"add_empty_line_before_elseif",
"replace_system_debug",