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
#!/usr/bin/env zsh | |
# Exit when any command fails | |
set -e | |
# https://docs.docker.com/engine/reference/commandline | |
SCRIPT_NAME=$(basename ${0}) | |
DELETE_BUILDER_CACHE=0 |
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
import { Observable, Subject, filter } from 'rxjs'; | |
import { PubSubMessage, PubSubService, PubSubTopic } from '../pubsub.types'; | |
export class PubSubServiceMock implements PubSubService { | |
public readonly subject$ = new Subject<PubSubMessage<PubSubTopic>>(); | |
public readonly publishSpy = jest.fn(); | |
public readonly streamSpy = jest.fn(); | |
public publish<T extends PubSubTopic>(message: PubSubMessage<T>): void { |
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "SFDX: Deploy Current File", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:source:deploy", | |
"--sourcepath", |
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 InvocableApexTemplate { | |
@InvocableMethod( | |
label = 'Name as displayed in Process Builder' | |
description = 'Tooltip as displayed in Process Builder' | |
) | |
public static List<Response> execute( List<Request> requests ) { | |
List<Response> responses = new List<Response>(); | |
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
# This script uses the GitHub Labels REST API | |
# https://developer.github.com/v3/issues/labels/ | |
# Provide a personal access token that can | |
# access the source and target repositories. | |
# This is how you authorize with the GitHub API. | |
# https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line | |
GH_TOKEN="YOUR_TOKEN" | |
# If you use GitHub Enterprise, change this to "https://<your_domain>/api/v3" |
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="ApprovalRequestCommentsController" access="global"> | |
<apex:attribute name="relatedToId" assignTo="{!targetObjectId}" type="String" description="ID of the record whose last approval comments to retrieve"/> | |
<apex:outputText value="{!comments}"/> | |
</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
OWNER="some_owner" | |
REPO="some_repo" | |
COMMIT="some_sha" | |
gh api \ | |
repos/${OWNER}/${REPO}/statuses/${COMMIT} \ | |
-X POST \ | |
-F state=success \ | |
-F description="Completed" \ | |
-F context=ci/release |
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
#!/bin/bash | |
set -e | |
# Name of the branch to merge all the pull requests into. | |
MERGE_BRANCH="staging" | |
# Name of the branch to hard reset to before merging others into it. | |
RESET_BRANCH="master" |
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
/** | |
* The function you pass to `asyncPoll` should return a promise | |
* that resolves with object that satisfies this interface. | |
* | |
* The `done` property indicates to the async poller whether to | |
* continue polling or not. | |
* | |
* When done is `true` that means you've got what you need | |
* and the poller will resolve with `data`. | |
* |
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
/** | |
* Inspired by @MoOx original script: https://gist.github.com/MoOx/93c2853fee760f42d97f | |
* Adds file download per @micalevisk https://gist.github.com/MoOx/93c2853fee760f42d97f#gistcomment-2660220 | |
* | |
* Changes include: | |
* - Get the description from the `title` attribute instead of `aria-label` (doesn't exist anymore) | |
* - Use style.backgroundColor and parse the rgb(...) to hex (rather than regex parsing of 'style' string) | |
* - Downloads labels to a JSON file named after the webpage to know which GitHub repo they came from. | |
* | |
* Last tested 2019-July-27: |
NewerOlder