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
| <apex:page controller="CreateCaseCon" docType="html-5.0" showHeader="false"> | |
| <style> | |
| html, body { | |
| height: 100%; | |
| } | |
| h3 { | |
| display: block; | |
| margin-top: 30px; | |
| margin-bottom: 10px; |
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 PatTest { | |
| public static void queryAllFields(String objTypeName) { | |
| Schema.DescribeSObjectResult[] descResult = | |
| Schema.describeSObjects(new String[]{objTypeName}); | |
| Map<String, Schema.SObjectField> fsMap = descResult[0].fields.getMap(); | |
| List<String> fieldNames = new List<String>(fsMap.keySet()); | |
| String queryString = 'SELECT '+String.join(fieldNames, ',')+' FROM Account LIMIT 1'; | |
| SObject obj = Database.query(queryString); |
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
| // Registration handler to create internal users from a Google social sign-on | |
| global class GoogleRegHandler implements Auth.RegistrationHandler{ | |
| global boolean canCreateUser(Auth.UserData data) { | |
| // TODO: Check whether you want to allow creation of a user with this data | |
| // e.g. test the domain name on the email address, or check some list | |
| // somewhere, and return true as appropriate | |
| return false; | |
| } | |
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
| var Twitter = require('twitter'); | |
| var pg = require('pg'); | |
| var tw = new Twitter({ | |
| consumer_key: process.env.TWITTER_CONSUMER_KEY, | |
| consumer_secret: process.env.TWITTER_CONSUMER_SECRET, | |
| access_token_key: process.env.TWITTER_ACCESS_TOKEN_KEY, | |
| access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET, | |
| }); |
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
| #require "Salesforce.class.nut:1.0.0" | |
| force <- Salesforce("CLIENT_ID_GOES_HERE", | |
| "CLIENT_SECRET_GOES_HERE"); | |
| USERNAME <- "user@example.com"; | |
| PASSWORD <- "p455w0rd"; | |
| SECURITY_TOKEN <- "s3cr3t"; | |
| force.login(USERNAME, PASSWORD, SECURITY_TOKEN, function(err, data) { |
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
| #require "Salesforce.class.nut:1.0.0" | |
| CLIENT_ID <- "CLIENT_ID_GOES_HERE"; | |
| CLIENT_SECRET <- "CLIENT_SECRET_GOES_HERE"; | |
| LOGIN_HOST <- "login.salesforce.com"; | |
| // Uncomment to clear saved OAuth state | |
| //server.save({}); | |
| OAUTH <- server.load(); |
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
| var jsforce = require('jsforce'); | |
| var unzip = require('unzip'); | |
| var xml2js = require('xml2js'); | |
| var sessionTimeoutSeconds = { | |
| FifteenMinutes : 900, | |
| ThirtyMinutes : 1800, | |
| SixtyMinutes : 3600, | |
| TwoHours : 7200, | |
| FourHours : 14400, |
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
| <apex:page docType="html-5.0" title="Bulk Uploader" sidebar="false"> | |
| <div id="byte_content"></div> | |
| <input type="file" id="files" onchange="upload()"/> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | |
| <script src="{!$Resource.forcetk}"></script> | |
| <script src="{!$Resource.jxon}"></script> | |
| <script src="{!$Resource.bulkTK}"></script> | |
| <script src="{!$Resource.vkbeautify}"></script> | |
| <script> | |
| function readBlob(opt_startByte, opt_stopByte) { |
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
| Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
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 Bulker { | |
| public static void insertHalfMillion() { | |
| for (Integer i = 0; i < 50; i++) { | |
| insertTenThousand(i * 10000); | |
| } | |
| } | |
| @future | |
| public static void insertTenThousand(Integer start) { | |
| List<Record__c> l = new List<Record__c>(); |