Skip to content

Instantly share code, notes, and snippets.

@sholloway
sholloway / SOQL Queries.sql
Last active February 12, 2025 19:05
Useful SOQL queries for exploring a Salesforce org.
--------------------------------------------------------------------
-- Queries related to distribution of metadata.
-- Find the number of users per profile.
SELECT count(id), Profile.name
FROM User
WHERE User.IsActive = true
GROUP BY Profile.name
-- Find the distribution of Apex classes per namespace.
select count(id), NameSpacePrefix
@pozil
pozil / toaster.cmp
Last active January 16, 2021 10:18
Lightning - Displaying a system toast with a few lines of code
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global">
<div class="slds-m-around--xx-large slds-text-align--center">
<lightning:button label="Fire toast event" onclick="{! c.fireToastEvent }"/>
</div>
</aura:component>
@VivekMChawla
VivekMChawla / 00 - Simple Trigger Pattern for Salesforce.md
Last active May 22, 2024 17:34
This gist contains the Simple Trigger Pattern for Salesforce (STP), created by Vivek M. Chawla (@VivekMChawla).

##Introduction

This gist contains the Simple Trigger Pattern for Salesforce (STP). This pattern was developed by Salesforce MVP Vivek M. Chawla (@VivekMChawla), a Salesforce Certified App Builder, Platform Developer I and II, and Advanced Administrator.

The Simple Trigger Pattern can be used to quick-start development of new triggers. It encapsulates several best-practices, including "One Trigger per Object", "No Business Logic in Triggers", and "Recursion Prevention Using Static Variables". The STP also facilitates adoption of the architectural best practice of Separation of Concerns.

NOTE: If you are looking for the Git Repository for the Simple Trigger Pattern, you can find it here: bit.ly/SimpleTriggerPattern

##Contents

@rsepassi
rsepassi / JitBitSQLAnswers.sql
Created June 9, 2013 14:42
JitBit SQL Interview Questions Answered
-- JitBit SQL Interview Questions (Posted on Hacker News)
-- http://www.jitbit.com/news/181-jitbits-sql-interview-questions/?utm_source=hackernewsletter&utm_medium=email
-- Schema:
-- employees table
-- EmployeeID
-- DepartmentID
-- BossID
-- Name
-- Salary
@mjhea0
mjhea0 / 1 - sql_interview_questions.md
Last active June 22, 2024 09:44
Jitbit's SQL interview questions
@andrewclegg
andrewclegg / bst.py
Created May 28, 2013 23:49
Example of binary search trees in Python
import random
# A demonstration of traversing a binary search tree in order.
# See the traverse function for all the action.
# Generic binary tree class
class Tree:
#include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
template <class T>
class Tree {
public:
~Tree();

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
@paulmillr
paulmillr / active.md
Last active May 7, 2025 14:35
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@sontek
sontek / snowjob.sh
Last active May 5, 2025 11:13
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear