Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick Dawkins pjcdawkins

View GitHub Profile
@pjcdawkins
pjcdawkins / get-cname.sh
Last active Feb 12, 2018
Get a production CNAME for a Platform.sh project
View get-cname.sh
#!/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 Jun 12, 2020
GitLab - Platform.sh CI scripts
View .gitlab-ci.yml
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 Mar 2, 2016
Guzzle 5 - get a URL with retries
View guzzle_get_retry.php
<?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
View keybase.md

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:

View pull-request-to-platform-branch.sh
#!/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').