Skip to content

Instantly share code, notes, and snippets.

View wes1278's full-sized avatar

Wes Weingartner wes1278

  • Pure Insurance
  • New York, NY
View GitHub Profile
@nahue
nahue / download_wesbos_videos.sh
Created May 17, 2016 17:25
Thanks to r.koller@gmail.com for taking the time to figure it out!
youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]" https://www.youtube.com/playlist\?list\=PLu8EoSxDXHP5uyzEWxdlr9WQTJJIzr6jy
@afawcett
afawcett / Address.cls
Last active August 12, 2022 00:25
Apex Address compound type, based on that provided in Spring'14 for Salesforce API, http://www.salesforce.com/us/developer/docs/api/Content/compound_fields_address.htm
public class Address
{
// Internally used to determine if valueOf method should read the state and country picker fields
private static Boolean stateAndCountryPickersEnabled = false;
static
{
// Are State and Country pickers enabled in this org?
Map<String, Schema.SObjectField> accountFields = Account.sObjectType.getDescribe().fields.getMap();
stateAndCountryPickersEnabled = accountFields.containsKey('BillingStateCode');