Skip to content

Instantly share code, notes, and snippets.

View sudhakar6's full-sized avatar
🎯
Focusing

Sudhakar sudhakar6

🎯
Focusing
View GitHub Profile
@msrivastav13
msrivastav13 / tasks.json
Created October 12, 2020 21:02
This one is for Retrieving org metadata using packages
{
"version": "2.0.0",
"tasks": [
{
"label": "SFDX: Retrieve Metadata From Package",
"type": "shell",
"command": "sfdx",
"args": [
"force:source:retrieve",
"-n",
@johndstein
johndstein / SamlJitHandler.java
Created January 31, 2018 20:17
Salesforce SAML JIT Handler
// This class provides logic for inbound just-in-time provisioning of single
// sign-on users in your Salesforce organization.
// Here's all the info we're going to have.
//
// Employee Id
// First Name
// Last Name
// Email
// Active Flag
# GET VERSION
yarn -v (or --version)
# GET HELP
yarn help
# CREATE PACKAGE.JSON
yarn init
yarn init -y // Use defaults
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active April 29, 2024 13:49
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@mannharleen
mannharleen / AnimalLocator.cls
Created October 31, 2016 15:36
Salesforce trailhead - Apex-Integration-Services-Apex-REST-Callouts
public class AnimalLocator {
public class cls_animal {
public Integer id;
public String name;
public String eats;
public String says;
}
public class JSONOutput{
public cls_animal animal;
@mannharleen
mannharleen / AccountProcessor.cls
Created October 31, 2016 15:32
Salesforce trailhead - Asynchronous Apex Using Future Methods
public class AccountProcessor {
@future
public static void countContacts(List<Id> accountId_lst) {
Map<Id,Integer> account_cno = new Map<Id,Integer>();
List<account> account_lst_all = new List<account>([select id, (select id from contacts) from account]);
for(account a:account_lst_all) {
account_cno.put(a.id,a.contacts.size()); //populate the map
@mannharleen
mannharleen / AccountManager.cls
Last active November 24, 2022 10:00
Salesforce trailhead - Apex-Integration-Services-Apex-Web-Services
@RestResource(urlMapping='/Accounts/*/contacts')
global with sharing class AccountManager {
@HttpGet
global static account getAccount() {
RestRequest request = RestContext.request;
String accountId = request.requestURI.substring(request.requestURI.lastIndexOf('/')-18,
@jamesramsay
jamesramsay / README.md
Last active April 26, 2024 13:15
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted