Skip to content

Instantly share code, notes, and snippets.

View saicharanreddyk's full-sized avatar

Saicharan Reddy K saicharanreddyk

View GitHub Profile
@saicharanreddyk
saicharanreddyk / SOQL Queries.sql
Created October 21, 2021 17:30 — forked from sholloway/SOQL Queries.sql
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
function YouTubeScraper() {
var sh1 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
var keyword = sh1.getRange("B1").getValue();
var results = YouTube.Search.list('id,snippet', {q:keyword, maxResults:50});
//Video ID Published Date Channel ID "Video Title
//" Description Thumbnail URL Channel Title
var items = results.items.map(function(e){
return [e.id.videoId,
e.snippet.publishedAt,
<aura:component>
<aura:attribute name="globalId" type="String"/>
<aura:registerEvent name="appEvent" type="c:LightningSimpleEvent"></aura:registerEvent>
<aura:handler event="c:LightningSimpleEvent" action="{!c.handleEvent}" phase="capture"></aura:handler>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12" padding="around-small">
Component: {!v.globalId}
</lightning:layoutItem>
<lightning:layoutItem size="12" padding="around-small">
@saicharanreddyk
saicharanreddyk / CompEventLifecycleApp.app
Created February 12, 2020 11:40 — forked from maujood/CompEventLifecycleApp.app
Lighting Component Events Demo
<aura:application extends="force:slds">
<aura:attribute name="globalId" type="String" />
<aura:registerEvent name="compEvent" type="c:LightningComponentEvent"></aura:registerEvent>
<aura:handler name="compEvent" event="c:LightningComponentEvent" action="{!c.handleEvent}" phase="bubble"></aura:handler>
<aura:handler name="compEvent" event="c:LightningComponentEvent" action="{!c.handleEventCapture}" phase="capture"></aura:handler>
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12" padding="around-small">
Application: {!v.globalId}
</lightning:layoutItem>
@saicharanreddyk
saicharanreddyk / SalesForceBackup.py
Created September 5, 2018 04:28 — forked from mattkatz/SalesForceBackup.py
Simple python Script to backup a salesforce instance to csv files
from simple_salesforce import Salesforce, SalesforceMalformedRequest
from argparse import ArgumentParser
from csv import DictWriter
from datetime import date
from pathlib import Path
production_instance = 'yourinstance.salesforce.com'
parser = ArgumentParser(description="Backs up all Salesforce objects to csv files")
parser.add_argument("username", help="User to authenticate as. Should be part of an 'integration_user' profile or some profile with no ip range restriction")