Skip to content

Instantly share code, notes, and snippets.

View macghriogair's full-sized avatar

Patrick macghriogair

  • Berlin
View GitHub Profile
@bcnzer
bcnzer / postman-pre-request.js
Last active July 22, 2024 10:59
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>',
@macghriogair
macghriogair / MockGuzzle.php
Last active August 31, 2018 10:56
Mocking Guzzle #tests #guzzle
<?php
namespace Tests;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Response;
@macghriogair
macghriogair / .babelrc
Last active August 23, 2017 07:45
Unit Test Vue + Webpack + Karma + Jasmine
{
"presets": [
[
"env",
{
"modules": false,
"targets": {
"browsers": [
"> 1%",
"last 2 versions",
@fideloper
fideloper / start-container.sh
Last active August 31, 2021 10:59
Enable/Disable xDebug depending on env.
#!/usr/bin/env bash
###
# A CMD or ENTRYPOINT script for a Dockerfile to use to start a Nginx/PHP-FPM
#
# For more details, see 🐳 https://shippingdocker.com
##
if [ ! "production" == "$APP_ENV" ] && [ ! "prod" == "$APP_ENV" ]; then
# Enable xdebug