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
| List<String> enbabledCurrencies = new List<String>(); | |
| for (CurrencyType curr :[SELECT IsoCode FROM CurrencyType WHERE IsActive = true]) { | |
| enbabledCurrencies.add(curr.IsoCode); | |
| } | |
| List<PricebookEntry> pbesToCreate = new List<PricebookEntry>(); | |
| for (Product2 prod :[SELECT Name, (SELECT CurrencyIsoCode FROM PricebookEntries) FROM Product2]) { |
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
| import random | |
| TEAMS = [ | |
| 'Argentina', | |
| 'Australia', | |
| 'Belgium', | |
| 'Brazil', | |
| 'Cameroon', | |
| 'Canada', | |
| 'Costa Rica', |
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
| import urllib | |
| import requests | |
| import traceback | |
| SALESFORCE_CONSUMER_KEY = 'XXX' | |
| SALESFORCE_CONSUMER_SECREET = 'XXX' | |
| SALESFORCE_REDIRECT_URI = 'https://myapp.com/salesforce/callback' | |
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 urllib.request import urlopen | |
| from bs4 import BeautifulSoup | |
| HN_URL = 'https://www.harveynorman.co.nz/whiteware/laundry/clothes-dryers/simpson-4kg-clothes-dryer-en.html' | |
| PRICE_DIV_ID = 'sec_discounted_price_54311' | |
| GOOD_PRICE = 400 | |
| def get_price(): | |
| """ | |
| Retrieve the price for the dryer! |
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
| @RestResource (urlMapping='/xero/webhook') | |
| global without sharing class XeroWebhook { | |
| @HttpPost | |
| global static void processIntentToReceive () { | |
| // Retrieve the Xero signature from the headers | |
| String xeroSignature = RestContext.request.headers.get('x-xero-signature'); | |
| // Retrieve the Xero payload body |
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
| import beatbox | |
| import datetime | |
| SANDBOX = True | |
| USERNAME = '[email protected]' | |
| PASSWORD = 'google12' | |
| sf = beatbox._tPartnerNS | |
| svc = beatbox.Client() | |
| if SANDBOX: |
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
| import xml.etree.ElementTree as xml | |
| import csv | |
| import sys | |
| def run(filename): | |
| """ | |
| Run the CSV output script | |
| """ |
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
| import xml.etree.ElementTree as xml | |
| import csv | |
| import sys | |
| # Take the filename from the argument passed to the script | |
| filename = sys.argv[1] | |
| # Need to wrap the XML file in opening and closing tags | |
| with open(filename) as f: | |
| xml_content = f.read() |
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
| import random | |
| import time | |
| def assign_teams(pool): | |
| """ | |
| Assign a team to the players, based on the Pool | |
| """ | |
| player_to_team_allocation = {} |
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 | |
| import pytz | |
| import datetime | |
| CLIENT_ID = '3MVG959Nd8JMmavRjCqjEGuLnGzR.CNuRMjOLwZKB_5gIxL0CvEXzU6Rqpf6pjdHu3cJXVvyYVrCwrxyLRy_i' | |
| SANDBOX = True | |
| USERNAME = '[email protected]' | |
| PASSWORD = 'google12' | |
| sf = Salesforce( |
NewerOlder