Skip to content

Instantly share code, notes, and snippets.

View jbro-io's full-sized avatar

Jonathan Broquist jbro-io

  • Scottsdale, AZ
View GitHub Profile
@jbro-io
jbro-io / FindHardCodedURLs.apex
Created October 16, 2016 04:59 — forked from danieljpeter/FindHardCodedURLs.apex
Execute anonymous script to check Email Templates for Hard Coded URLs before turning on My Domain
/*
* 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.
/**
* 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', []);
var express = require('express');
var oauth = require('oauth');
var oa;
var app = express.createServer();
app.get('/', function (req, res) {
res.end('<!DOCTYPE html><meta charset=utf-8><form action=/authorize><label>Client ID: <input type=text name=client_id required autofocus></label><br><label>Client Secret: <input type=text name=client_secret required></label><br><label>Scope: <input type=text name=scope required></label><br><input type=submit>');
});
app.get('/authorize', function (req, res) {
// "Cols" and "Rows" specify the coordinates in x and y.
// Cells create cells by indexing the rows and cols array in the order [startx, starty, endx, endy].
// Edit your Main.Sublime-menu file
// Mac: /Users/yourMacName/Library/Application Support/Sublime Text 2/Packages/Default
// PC: C:\Users\yourPCName\AppData\Roaming\Sublime Text 2\Packages\Default
// Example Below:
{
"caption": "Grid: 6",
"command": "set_layout",

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt