Skip to content

Instantly share code, notes, and snippets.


Dave Carroll dcarroll

View GitHub Profile
dcarroll / GoInstant Web RTC Sample
Created Feb 24, 2014
Working sample of using GoInstant Web RTC Chat and Video Widget.
View GoInstant Web RTC Sample
<!-- visStyles Static resource for CSS styles -->
.gi-override {
position: relative;
.webrtc-container {
position: relative;
float: left;
width: 559px;
height: 420px;
dcarroll /
Created Nov 16, 2017
Uninstall script for Salesforce CLI installed via the Mac OSx installer DMG.
# NOTE: As with any script you download on the internet,
# please make sure you understand what each command is
# going to do before running it.
rm -rf /usr/local/sfdx
rm -rf /usr/local/lib/sfdx
rm -rf /usr/local/bin/sfdx
rm -rf ~/.local/share/sfdx ~/.config/sfdx ~/.cache/sfdx
dcarroll / .bash_profile
Last active Dec 22, 2019
This is the bash profile that I use. You will see some things commented out and some experiments. Feel free to remove those, build on them, whatever you want to do. Make sure you look as the path exporting section as you system may have different paths.
View .bash_profile
# dx customizations
alias status='(sfdx force:org:list &
sfdx force:alias:list &
sfdx force:config:list; wait)'
alias orglist='sfdx force:org:list'
alias orglistc='sfdx force:org:list --clean -p'
alias push='sfdx force:source:push'
alias pull='sfdx force:source:pull'
dcarroll / gist:8427394
Created Jan 14, 2014
Javascript operations for Visualforce Remote Objects. Totally subject to change as this feature is currently in Developer Preview until Summer '14.
View gist:8427394
/* PRE - model declaration on vf page
<apex:remoteObjectModel name="Account" fields="Id,Name" />
// 1. W/o default properties
var acc = new SObjectModel.Account();
dcarroll / twilioconfig.ts
Created Apr 9, 2019
Twilio config file template
View twilioconfig.ts
import { ConfigFile } from "@salesforce/core";
export default class TwilioConfig extends ConfigFile<ConfigFile.Options> {
public static getFileName(): string {
return 'twilioconfig.json';
dcarroll / config.ts
Created Apr 9, 2019
Twilio Config for Plugin
View config.ts
import { flags, SfdxCommand } from '@salesforce/command';
import { Messages, SfdxError } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import { Twilio } from 'twilio';
import TwilioConfig from '../../../lib/twilioconfig';
// Initialize Messages with the current plugin directory
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
dcarroll /
Created Jul 28, 2017
Simple script to check if the org you are using is a Dev Hub. Run by passing a username or alias to the script.
# specify your username or alias
hub=$(sfdx force:data:soql:query -q "SELECT DurableId, SettingValue FROM OrganizationSettingsDetail WHERE SettingName = 'ScratchOrgManagementPref'" -t -u ${usernameOrAlias} --json)
# parse response
size="$(echo ${hub} | jq -r .result.size)"
dcarroll /
Last active Apr 5, 2019
Handy script that executes the DX Demo scripts steps one at a time. Just keep hitting return. You can cancel the script by enter `q` then `return`. The scripts assumes that you have authenticated to a hub org already. Everything about this script happens relative to where you are running it from.
txtred='\e[0;31m' # Red
bldgrn='\e[1;32m' # Green
txtrst='\e[0m' # Text Reset
#trap "exit 1" TERM
#export TOP_PID=$$
prompt() {
dcarroll /
Created Jan 8, 2019
Script to migrate Eclipse/Metadata format project to SFDX Source format project.
if [ $# -eq 0 ]
echo "No arguments supplied, please supply the project directory, the source directory within the project directory and optionally 'yes' to preserve the original metadata."
exit 1
if [ -z "$2" ]
View Gnarly Profile
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="">