Skip to content

Instantly share code, notes, and snippets.

@blaisep
blaisep / workplace_webhook.md
Last active Mar 4, 2020
Facebook Workplace Admin Event Webhook integration
View workplace_webhook.md

Process Facebook Workplace Admin Events using webhooks

Facebook Workplace charges extra to log admin events. Facebook will publish Admin events for free via webhooks. You can "subscribe" they don't queue and they don't retransmit. To subscribe, you'll need to register a public URL with a recognized TLS certificate. Finally, you'll need a handler at that URL to participate in a rudimentary verification handshake before Facebook will register a webhook destination.

Considering these requirements, the solution has to:

  • set up an externally accessible server
  • get a domain name and a public SSL cert
View brew-install-script.sh
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing brew cask..."
brew tap caskroom/cask
@blaisep
blaisep / jenkins-pipeline-git-cred.md
Created Oct 20, 2016
Insert git credentials into Jenkins Pipeline Script projects
View jenkins-pipeline-git-cred.md

Suppose you want to inject a credential into a Pipeline script. The cloudbees note does not include Pipeline script examples. https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs

The Jenkins Pipeline Docs' description of the git pushmethod doesn't have an example using injected credentials. (https://jenkins.io/doc/pipeline/examples/#push-git-repo)

The Snippet generator is helpful, but not not if you try to follow the instructions at: https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin

@blaisep
blaisep / gist:63e2af6d3b7b32a2b69c4bccf0293df1
Created Oct 20, 2016
Insert Git Credentials using Jenkins Pipeline Script
View gist:63e2af6d3b7b32a2b69c4bccf0293df1
Suppose you want to inject a credential into a Pipeline script.
The cloudbees note does not include Pipeline script examples.
https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs
The Jenkins Pipeline Docs' description of the `git push`method doesn't have an example using injected credentials.
(https://jenkins.io/doc/pipeline/examples/#push-git-repo)
The Snippet generator is helpful, but not not if you try to follow the instructions at:
https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin