Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| /// usage below | |
| List<String> urls = new List<String>{ | |
| 'https://example1.com', | |
| 'https://example2.com', | |
| 'https://example3.com' | |
| }; | |
| AddTrustedUrls.addUrlsToTrustedSites(urls); | |
| public class AddTrustedUrls { | |
| @AuraEnabled | |
| public static void addUrlsToTrustedSites(List<String> urls) { |
| import socket | |
| import struct | |
| class VNCServer: | |
| def __init__(self, host='localhost', port=5900): | |
| self.host = host | |
| self.port = port | |
| self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| self.server_socket.bind((self.host, self.port)) | |
| self.server_socket.listen(1) |
| List<Account> accList = new List<Account>( | |
| [Select | |
| Id | |
| ,Name | |
| ,(Select | |
| From | |
| Contacts | |
| ) | |
| From Account] |
| #the follow file ends with .conf and needs to be in the /etc/rsyslog.d dir | |
| *.* @<GRAYLOG SERVER>:<PORT>;RSYSLOG_SyslogProtocol23Format | |
| FOR E.G. *.* @192.168.0.1:5514;RSYSLOG_SyslogProtocol23Format |
| Pricebook2 pb = new Pricebook2(Name = 'Standard Price Book 2009', Description = 'Price Book 2009 Products', IsActive = true ); | |
| insert pb; | |
| Product2 prod = new Product2(Name = 'SLA: Bronze', IsActive = true); | |
| insert prod; | |
| // First insert a price for the standard price book | |
| Pricebook2 standardPB = [select id from Pricebook2 where isStandard=true]; | |
| PricebookEntry standardPBE = new PricebookEntry(Pricebook2Id = standardPB.Id, Product2Id = prod.Id, UnitPrice = 1000, IsActive = true); | |
| insert standardPBE; | |
| PricebookEntry pbe = new PricebookEntry(Pricebook2Id = pb.Id, Product2Id = prod.Id, UnitPrice = 1000, IsActive = true); | |
| insert pbe; |
| List<Id> accountids = new List<Id>(); | |
| accountids.addAll(new Map<Id, sObject>([select id from account where parentid='0016000000zK5N7AAK']).keyset()); | |
| system.debug(accountids); |
| //redirect a page to visualforce page | |
| ApexPages.PageReference pg = new ApexPages.PageReference('/apex/<VisualForcePage>?id='+Contact.Id); | |
| pg.setRedirect(true); | |
| return pg; |
| I first needed to install rpi-update... | |
| "sudo apt-get install rpi-update" | |
| the update the kernel using: | |
| sudo rpi-update |
| sudo killall fbi >/dev/null 2>&1 | |
| dialog --infobox "\nWelcome to retro gaming console - First time boot ! hang tight - Resizing the filesystem ..." 5 60 | |
| sudo raspi-config nonint do_expand_rootfs >/dev/null 2>&1 | |
| sleep 2 | |
| dialog --infobox "\nDone. Rebooting now- ready to play in few moments..." 5 60 | |
| sudo rm -f /etc/profile.d/01-expand.sh | |
| sleep 2 | |
| sudo reboot |