Skip to content

Instantly share code, notes, and snippets.

View shanerk's full-sized avatar
Wizards only, fools!

Shane K shanerk

Wizards only, fools!
View GitHub Profile
@shanerk
shanerk / .gitignore
Created December 28, 2018 20:04 — forked from leosoto/bb2gh.sh
Moves all your organization's bitbucket repositories to GitHub. Note that when a repository is correctly uploaded to GitHub it is *removed* from BitBucket. Requires https://bitbucket.org/zhemao/bitbucket-cli/. Set the variables BB_* with your bitbucket credentials and GH_* variables with your GitHub credentials.
env.sh
*.git
@shanerk
shanerk / ApexDmlUtil.java
Last active December 13, 2018 15:08
Apex Generic method to process Database.SaveResults
public with sharing class ApexDmlUtil {
public void processSaveResults(List<Database.SaveResult> results) {
List<String> errors;
for (Database.SaveResult r : results) {
if (!r.isSuccess()) {
RAL_MetricService.increment(RAL_MetricService.Metric.Errored, this.file.Id);
errors = new List<String>();
for (Database.Error e : r.errors) {
errors.add(e.message);
}