Skip to content

Instantly share code, notes, and snippets.

View pjcdawkins's full-sized avatar

Patrick Dawkins pjcdawkins

View GitHub Profile
@pjcdawkins
pjcdawkins / get-cname.sh
Last active February 12, 2018 17:21
Get a production CNAME for a Platform.sh project
#!/usr/bin/env bash
set -e -o pipefail
project=${1:-$(platform project:info id)}
default_route='https://{default}/'
route=${2:-$default_route}
prod='master'
other=''
@pjcdawkins
pjcdawkins / .gitlab-ci.yml
Last active June 12, 2020 15:45
GitLab - Platform.sh CI scripts
stages:
- review
- cleanup
variables:
# The Platform.sh project ID.
PF_PROJECT_ID: abcdefg123456
push-platformsh:
# This Docker image installs the Platform.sh CLI (and PHP, Git and SSH).
@pjcdawkins
pjcdawkins / guzzle_get_retry.php
Created March 2, 2016 11:56
Guzzle 5 - get a URL with retries
<?php
/**
* Get a URL, with automatic retries.
*
* @param \GuzzleHttp\Client $client
* @param string $url
* @param int|float $timeout
* @param int $max_attempts
*
* @throws \GuzzleHttp\Exception\RequestException

Keybase proof

I hereby claim:

  • I am pjcdawkins on github.
  • I am pjcdawkins (https://keybase.io/pjcdawkins) on keybase.
  • I have a public key whose fingerprint is 2D1D 8268 AC34 74DC 8718 41EE 0142 FAA3 9EC3 B454

To claim this, I am signing this object:

#!/bin/bash
set -e
### ABOUT ###
# This is a Jenkins build script which integrates with the GitHub Pull Request
# Builder plugin.
### ENVIRONMENT VARIABLES ###
# PF_PROJECT_ID Required: your Platform.sh project ID.
# PF_CLUSTER Required: the cluster for your project ('eu' or 'us').