This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------- | |
-- 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 |