Skip to content

Instantly share code, notes, and snippets.

View deviantlycan's full-sized avatar

deviantlycan

View GitHub Profile
@bcnzer
bcnzer / postman-pre-request.js
Last active April 16, 2025 06:21
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@christippett
christippett / deploy_endpoints.sh
Created March 20, 2017 08:55
Automate deployment of Google Cloud Endpoints, including updating App Engine's app.yaml with latest config_id
# This script is designed to be run in a post-commit build script.
# It checks if openapi.yaml has been modified and deploys the latest
# API specification to Google Cloud Endpoints and updates app.yaml
# with the latest config_id
SERVICE_NAME=sample.endpoints.[PROJECT_ID].appspot.com
if $(git diff-tree --no-commit-id --name-only -r HEAD | grep -q openapi.yaml); then
echo "Detected changes to openapi.yaml in last commit, deploying new version to Cloud Endpoints..."
gcloud service-management deploy openapi.yaml