Use Postman to send and receive API requests to Salesforce to aid in developing and testing.
- Salesforce Org
- Setup
- App Manager
- (new or select one)
- API (Enable OAuth Settings) to get Consumer KEY and SECRET
| run = '\033[1;97m[~]\033[1;m' | |
| bad = '\033[1;31m[-]\033[1;m' | |
| good = '\033[1;32m[+]\033[1;m' | |
| info = '\033[1;33m[!]\033[1;m' | |
| que = '\033[1;34m[?]\033[1;m' |
| var csv_arr = []; | |
| // add header first before pushing data | |
| csv.push(["Bruh", "Data", "Date", "Ect"]); | |
| for(var i = 0; i <= somedata.length; i++){ | |
| csv_arr.push(somedata[i]); | |
| } | |
| // found: https://gist.github.com/yangshun/01b81762e8d30f0d7f8f | |
| document.querySelector("#muh_epic_button").addEventListener("click", function () { |
| jQuery(function($) { | |
| $(".my-selector").on('scroll', function() { | |
| if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) { | |
| // at the bottom, do stuff like hide a down arrow | |
| $(".down-arrow").addClass("hide"); | |
| }else{ | |
| // not at bottom, show down arrow or something else | |
| $(".down-arrow").removeClass("hide"); | |
| } | |
| }) |
| // Get list of email addresses by Permission Set | |
| public static List<String> getEmailByPermSet(String permsetname){ | |
| List<Id> just_ids = new List<Id>(); | |
| List<PermissionSetAssignment> users = [ | |
| SELECT AssigneeId | |
| FROM PermissionSetAssignment | |
| WHERE PermissionSet.Name = :permsetname | |
| ]; | |
| for(PermissionSetAssignment uid: users){ | |
| just_ids.add(uid.AssigneeId); |
$ sudo apt install openvpn easy-rsatls-cipher "DEFAULT:@SECLEVEL=0"$ sudo openvpn my_file.ovpn| public class EmailSend { | |
| public static void sendEmail(String candidate){ | |
| Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); | |
| mail.setToAddresses(new String[]{candidate}); | |
| mail.setReplyTo('hr_address@my_company.com'); | |
| mail.setSubject('Thank You'); | |
| // https://help.salesforce.com/articleView?id=000340122&type=1&mode=1 | |
| // org-wide email address needs to be set |
| @isTest | |
| public class TestEmailSend { | |
| @isTest | |
| static void testTheEmail(){ | |
| Test.startTest(); | |
| // the method we're testing | |
| // https://gist.github.com/techb/7519e95bac3caa2b8adb3f65d2dc2dc8 | |
| EmailSend.sendEmail('test@test.com'); | |
| // we assert buy what govener limits say |
| def decimal2binary(n): | |
| # check if larger than 255 as per requirements | |
| if n > 255: | |
| return "Int too large" | |
| # this is the string we're returning | |
| binStr = "" | |
| # this will loop forever if n never gets to or below 0 | |
| while n > 0: |