Skip to content

Instantly share code, notes, and snippets.

@gdmarsh
gdmarsh / keybase.md
Created December 16, 2019 10:13
keybase.md

Keybase proof

I hereby claim:

  • I am gdmarsh on github.
  • I am gdmarsh (https://keybase.io/gdmarsh) on keybase.
  • I have a public key ASCQD3WxN1DZiK3O_KwoPjKkPPHGCGURKvY1Xz65kHGmTAo

To claim this, I am signing this object:

@gdmarsh
gdmarsh / crunchyroll-simulcast-calendar.user.js
Last active October 16, 2023 11:46
User script for Crunchyroll's Simulcast Calendar
// ==UserScript==
// @name Crunchyroll Simulcast Calendar
// @namespace http://iceydragon.github.io
// @version 0.2
// @description Adds queued items toggle and release layout options
// @author iceydragon
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser-polyfill.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js
// @match https://www.crunchyroll.com/simulcastcalendar*
@gdmarsh
gdmarsh / RetrieveDateFields
Created August 7, 2014 12:11
Anonymous script to print out list of date fields from a specified sObject
Map<String, Schema.SObjectField> fieldMap =
Schema.SObjectType.Account.fields.getMap();
List<String> fieldNames = new List<String>();
for(Schema.SObjectField fld : fieldMap) {
Schema.DescribeFieldResult res = fld.getDescribe();
if(res.getType() == Schema.DisplayType.DATE) {
fieldNames.add(res.getName());
}
}
fieldNames.sort();
@gdmarsh
gdmarsh / MessageUtil.cls
Last active February 10, 2016 23:35
Provides simplified methods to create apex page messages
/**
* Provides simplified methods to create apex page messages
*
* @author Gary Marsh
* @since 2014-02-27
*/
public class MessageUtil {
/**
* [addConfirm description]
@gdmarsh
gdmarsh / IdProvider.cls
Last active August 29, 2015 13:56
Provides methods to retrieve ids from sobjects based on an arbitary field name
/**
* Provides methods to retrieve ids from sobjects based on an arbitary field
* name
* @author Gary Marsh
* @since 2014-01-23
*/
public class IdProvider {
/**
* Gets a set of ids from a list of sobjects based on the specified field