Host bitbucket.org-yourusername
HostName bitbucket.org
User yourusername
IdentityFile ~/.ssh/yoursshkey
IdentitiesOnly yes
This file contains 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
trigger AccountTrigger on Account( | |
before insert, | |
before update, | |
before delete, | |
after insert, | |
after update, | |
after delete, | |
after undelete | |
) { | |
AccountTriggerHandler objectHandler = new AccountTriggerHandler(Trigger.operationType); |
This file contains 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
@isTest | |
private class TriggerHandlerTest { | |
// I normally put private classes at the bottom, but to prevent you from having to scroll ... | |
private class TestTriggerHandler extends TriggerHandler { | |
public TriggerOperation Method { get; private set; } | |
@testVisible | |
protected override void beforeInsert(List<SObject> newRecords) { | |
this.Method = TriggerOperation.BEFORE_INSERT; | |
} |
This file contains 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
public virtual class TriggerHandler { | |
@testVisible | |
private static TriggerOperation triggerContext; | |
protected TriggerHandler() { | |
if (!Trigger.isExecuting && !Test.isRunningTest()) { | |
throw new TriggerHandlerException('TriggerHandler used outside of triggers / testing'); | |
} | |
} |
This file contains 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
HYPERLINK( | |
/* If they're in Lightning */ | |
IF($User.UIThemeDisplayed="Theme4d", | |
/* Use Lightning syntax, optimized to avoid full page reload */ | |
"#/sObject/00OE0000003BLQi/view?fv0=", | |
/* Otherwise use Classic syntax */ | |
"/00OE0000003BLQi?pv0=") |
This file contains 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
/* | |
* Hard coding your Salesforce URL in places like Email Tempaltes and Apex Classes is a worst practice, but some people do it. | |
* These URLs will break when you turn on my domain, since your URL changes. | |
* More on this here: https://help.salesforce.com/apex/HTViewSolution?urlname=Updating-Hard-Coded-References-FAQ | |
* Here are some quick and dirty checks for your Salesforce URL being hard coded in: | |
* EmailTemplates, WebLinks, ApexClasses, Visualforce Pages, and Triggers. | |
* Ideally you would retrieve all metadata and search it, but this will find some of the low hanging problems easily. | |
* | |
* Usage: | |
* - Copy / Paste this into Salesforce Execute Anonymous window. |
This file contains 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
/* ********************************************************************************************** | |
* TimeConversions Class | |
* Created by: Michael Smith/Force2b, 04/06/2010 | |
* | |
************************************************************************************************ */ | |
global class TimeConversions { | |
/* ------------------------------------------------------------------------------------- | |
* Returns an Integer of the Timezone Offset from Eastern Time for the | |
* currently logged in user |
This file contains 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
{"suggestedFilters":{"header":"Tap to show:","filters":[{"name":"Open now","key":"openNow"},{"name":"With specials","key":"specials"}]},"geocode":{"what":"","where":"scottsdale az","center":{"lat":33.50921,"lng":-111.89903},"displayString":"Scottsdale, AZ, United States","cc":"US","geometry":{"bounds":{"ne":{"lat":33.900393,"lng":-111.755884},"sw":{"lat":33.447584,"lng":-111.960976}}},"slug":"scottsdale-arizona","longId":"72057594043241393"},"headerLocation":"Scottsdale","headerFullLocation":"Scottsdale","headerLocationGranularity":"city","query":"beer","totalResults":110,"suggestedBounds":{"ne":{"lat":33.650293098646216,"lng":-111.88397289519348},"sw":{"lat":33.38032224279749,"lng":-112.05341910022888}},"groups":[{"type":"Recommended Places","name":"recommended","items":[{"reasons":{"count":0,"items":[{"summary":"This spot is popular","type":"general","reasonName":"globalInteractionReason"}]},"venue":{"id":"4fa04d9ae4b0e93e3350caea","name":"Brat Haüs","contact":{"phone":"4809474006","formattedPhone":"(480) |
This file contains 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
<!-- ---------------------------------------------------------------------- --> | |
<!-- NOTE: Please add the following <META> element to your page <HEAD>. --> | |
<!-- If necessary, please modify the charset parameter to specify the --> | |
<!-- character set of your HTML page. --> | |
<!-- ---------------------------------------------------------------------- --> | |
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"> | |
<!-- ---------------------------------------------------------------------- --> | |
<!-- NOTE: Please add the following <FORM> element to your page. --> |
This file contains 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
/** | |
* Interceptor | |
* Implements functionality to catch various requests and fire events when they happen. This is generally to ensure | |
* that responses from the server are handled in a uniform fashion across the application. Also, by firing events | |
* it allows to have any number of handlers attach to the response. | |
* | |
* @author Kirk Bushell | |
* @date 28th March 2013 | |
*/ | |
var module = angular.module('core.interceptor', []); |
NewerOlder