Skip to content

Instantly share code, notes, and snippets.

View rossbelmont's full-sized avatar

Ross Belmont rossbelmont

View GitHub Profile
@rossbelmont
rossbelmont / gist:632995
Created October 18, 2010 20:31
ack command line output: Search results for Short_URL__c only with Apex/VF
> ack --type=apex Short_URL__c

classes/UrlController.cls
21:        Short_URL__c[] urls;
25:            from Short_URL__c
51:        click.Short_URL__c = urls[0].id;
82:    	Short_URL__c url = new Short_URL__c();

classes/urlHomeController.cls

3: public Short_URL__c newURL { get; set; }

@rossbelmont
rossbelmont / .ackrc
Created October 18, 2010 20:37
Defines an ack configuration optimized for Force.com development
--type-set=apex=.page,.cls,.component,.trigger
--type-set=force=.object,.app,.profile
--pager=less -r
@rossbelmont
rossbelmont / gist:632948
Created October 18, 2010 20:09
ack command line output: Search results for Short_URL__c
> ack Short_URL__c

classes/UrlController.cls
21:        Short_URL__c[] urls;
25:            from Short_URL__c
51:        click.Short_URL__c = urls[0].id;
82:    	Short_URL__c url = new Short_URL__c();

classes/urlHomeController.cls

3: public Short_URL__c newURL { get; set; }

@rossbelmont
rossbelmont / sample_v2mom.md
Last active December 29, 2015 22:00
Sample V2MOM for a software project

Vision

Rapidly deploy our platform with some key custom extensions to a small pilot group within {key customer's} {department} staff to modernize their {department} efforts.

Values

  • Human-centered: We’re providing tools to skilled workers, not building rigid machines that do people’s jobs for them.
  • Flexible: We will strive to use lightweight solutions wherever possible to allow for configurable workflows. Today, the users can adjust their own technology at any time.
  • Speed: Delivering quickly allows us to fold in feedback and course-correct instead of emphasizing a waterfall-style requirements document.

Methods

  • Work iteratively: The first pancake is always lumpy. Build time into the schedule to gather feedback and make revisions instead of shipping the first thing off the line.
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Transactional Email</title>
<style>
/* -------------------------------------
INLINED WITH htmlemail.io/inline
------------------------------------- */
@rossbelmont
rossbelmont / gist:1424028
Last active February 19, 2022 16:07
Outbound Message "thumbs up" response XML
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<NotificationsResponse>
<Ack>true</Ack>
</NotificationsResponse>
</soapenv:Body>
</soapenv:Envelope>
@rossbelmont
rossbelmont / qual.js
Last active February 19, 2022 18:47
Qualifier for Percentage Formulas
// First attempt
Employees: {
"CertaintyScore": { // This is the value in DynamoDB
"value":"CertaintyPerc/100" // 70 → 0.7
},
"CertaintyPerc: {
"presence":"derived", // Derived, not in DynamoDB
"value":"CertaintyScore*100" // 0.7 → 70
}
}
@rossbelmont
rossbelmont / config.xml
Last active February 22, 2022 03:24
S3 Lifecycle Configuration Sample
<LifecycleConfiguration>
<Rule>
<ID>
deletefiles
</ID>
<Filter>
<Prefix>
testdoc
</Prefix>
</Filter>
@rossbelmont
rossbelmont / test.authprovider
Last active February 22, 2022 21:03
AuthProvider retrieved from Metadata API, was originally in an unmanaged package pulled in from a Named Credential
<?xml version="1.0" encoding="UTF-8"?>
<AuthProvider xmlns="http://soap.sforce.com/2006/04/metadata">
<authorizeUrl>https://ims-na1.adobelogin.com/ims/authorize/v2</authorizeUrl>
<consumerKey>dadadf5ff73142098d771cd87969971d</consumerKey>
<consumerSecret>Yz0vYblsJ9u5oFoH0wMlBXhNtzvgXsoydf5n0/fGKnPg1g/xs41EqA==</consumerSecret>
<defaultScopes>openid</defaultScopes>
<friendlyName>Adobe</friendlyName>
<includeOrgIdInIdentifier>false</includeOrgIdInIdentifier>
<providerType>OpenIdConnect</providerType>
<sendAccessTokenInHeader>true</sendAccessTokenInHeader>
@rossbelmont
rossbelmont / retrieveMDforAuthProviders.xml
Last active February 22, 2022 21:09
Metadata retrieve for AuthProviders
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>AuthProvider</name>
</types>
<version>50.0</version>
</Package>