This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.community/t/deleting-files-via-trees-no-longer-works/14042 | |
def commit_files_to_remove | |
# get the base branch tree that has all of the files in it | |
branch_tree = github.git_data.trees.get @repo.username, | |
@repo.repo_name, | |
new_branch_sha, | |
recursive: true | |
# select only the files for THIS badge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Restforce | |
class Mash < Hashie::Mash | |
class << self | |
def klass(val) | |
if val.key? 'records' | |
# When the hash has a records key, it should be considered a collection | |
# of sobject records. | |
Restforce::Collection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'sinatra' | |
require 'omniauth' | |
require 'omniauth-salesforce' | |
rescue LoadError | |
require 'rubygems' | |
require 'sinatra' | |
require 'omniauth' | |
require 'omniauth-salesforce' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the association object with the final data | |
associations = { | |
"elements": elements | |
} | |
// create all of the associations | |
request({ | |
url: 'https://api.clover.com:443/v3/merchants/'+process.env.CLOVER_MERCHANT_ID+'/category_items', | |
method: 'POST', | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class ChatterUtils { | |
// makes a simple chatter text post to the specified user from the running user | |
public static void simpleTextPost(Id userId, String postText) { | |
ConnectApi.FeedType feedType = ConnectApi.FeedType.UserProfile; | |
ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput(); | |
messageInput.messageSegments = new List<ConnectApi.MessageSegmentInput>(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:component controller="ContactListViewController"> | |
<apex:attribute name="listViewName" type="String" required="true" | |
description="The name of the listview." assignTo="{!listName}"/> | |
<apex:enhancedList height="400" rowsPerPage="25" id="ContactList" | |
listId="{!listId}" rendered="{!listId != null}" /> | |
<apex:outputText rendered="{!listId == null}" value="Could not find requewed ListView: '{!listName}'. Please contact your administrator."/> | |
</apex:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openModal(name) { | |
$("#"+name).addClass('slds-fade-in-open'); | |
$("#backdrop").addClass('slds-backdrop_open'); | |
} | |
function closeModal(name) { | |
$("#"+name).removeClass('slds-fade-in-open'); | |
$("#backdrop").removeClass('slds-backdrop_open'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var request = require('request'); | |
var moment = require("moment"); | |
var crypto = require('crypto'); | |
var apiToken = 'MY-TOKEN'; | |
var apiSecret = 'MY-SECRET'; | |
var generateSession = function(userName, sessionName) { | |
var relativeUrl = "/services/api/sts/GenerateSession/"+userName+"/"+sessionName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<actionOverrides> | |
<actionName>Accept</actionName> | |
<type>Default</type> | |
</actionOverrides> | |
<actionOverrides> | |
<actionName>CancelEdit</actionName> | |
<type>Default</type> | |
</actionOverrides> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module dependencies. | |
*/ | |
var config = require('./config.js'); | |
var express = require('express') | |
, faye = require('faye') | |
, nforce = require('nforce') | |
, util = require('util') | |
, routes = require('./routes'); |