- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
$ sudo apt install openvpn easy-rsa
- download the .ovpn file
- add
tls-cipher "DEFAULT:@SECLEVEL=0"
$ sudo openvpn my_file.ovpn
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
<?php | |
/* | |
Template Name: AR Example | |
Don't use get_header() or get_footer() | |
this page needs to be 'blank' so the cam/ar view takes the whole | |
screen/canvas and no styles are applied except the ones we define here. | |
Some info and docs: | |
General |
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
states = [ | |
'Alabama', | |
'Alaska', | |
'Arizona', | |
'Arkansas', | |
'California', | |
'Colorado', | |
'Connecticut', | |
'Delaware', | |
'District of Columbia', |
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
// When the user scrolls the page, execute myFunction | |
window.onscroll = function() {myFunction()}; | |
// Get the header | |
var header = document.getElementById("myHeader"); | |
// Get the offset position of the navbar | |
var sticky = header.offsetTop; | |
var stickyBottom = header.offsetBottom; |
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
:: https://stackoverflow.com/questions/15885132/file-folder-chooser-dialog-from-a-windows-batch-script | |
@echo off | |
set dialog="about:<input type=file id=FILE><script>FILE.click();new ActiveXObject | |
set dialog=%dialog%('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value); | |
set dialog=%dialog%close();resizeTo(0,0);</script>" | |
for /f "tokens=* delims=" %%p in ('mshta.exe %dialog%') do set "file=%%p" | |
echo selected file is : "%file%" |
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
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: |
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
@isTest | |
public class TestEmailSend { | |
@isTest | |
static void testTheEmail(){ | |
Test.startTest(); | |
// the method we're testing | |
// https://gist.github.com/techb/7519e95bac3caa2b8adb3f65d2dc2dc8 | |
EmailSend.sendEmail('[email protected]'); | |
// we assert buy what govener limits say |
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
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 |
- TrailHead
- https://trailblazer.me/id/kbcarte
- Summery
- SFDX
- Advanced Apex
- Bulk Apex
- Visual Force Pages
- Lightning Components
- Lightning Web Components
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
// 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); |