Skip to content

Instantly share code, notes, and snippets.

View codefriar's full-sized avatar

Kevin Poorman codefriar

View GitHub Profile
@codefriar
codefriar / MonitorAsyncUsage.cls
Created November 30, 2023 19:01 — forked from brianmfear/MonitorAsyncUsage.cls
Notify Admin when approaching Async Apex usage limit
public class MonitorAsyncUsage implements Schedulable {
public class ResourceInfo {
public Integer Max;
public Integer Remaining;
}
public class LimitsAPI {
public ResourceInfo DailyAsyncApexExecutions;
}
/**
* ContactTriggerHandler description
* @description this class is responbile for...
* @author Kevin Poorman
* @updated 8/26/19
*/
public with sharing class CommentingOnCodeExercise {
/**
public with sharing class WeekFiveHomework {
public static void setsReview(){
//Your assignment: Play with Sets!
// 1. Create a set of Strings and add at least 5 entries
Set<String> Colors = new Set<String>();
Colors.add('Pink');
@codefriar
codefriar / DestroyAllTheThings.cls
Created April 12, 2016 10:21 — forked from joshbirk/DestroyAllTheThings.cls
Simple class to try and destroy all records in a Salesforce instance. Does not currently destroy Apex, or Visualforce, or Lightning components. It probably will never do the latter, I'm not sure I want it to do the former. Does not destroy custom metadata, but I'm looking into it. TODO: Parameters to avoid limits.
public class DestroyAllTheThings {
public DestroyAllTheThings() {}
public void destroySimpleCRMStuff() {
//First clear out known dependents, leads and cases etc.