Skip to content

Instantly share code, notes, and snippets.

💭
Why does Github need statuses?

Stephen Ball REBELinBLUE

💭
Why does Github need statuses?
  • LendInvest
  • London
Block or report user

Report or block REBELinBLUE

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:97a5c13c2589bb1f3df5a5b330718eb0
---
apiVersion: "v1"
kind: "Pod"
metadata:
labels:
jenkins: "slave"
jenkins/slaves: "true"
name: "jenkins-slave-mwwnx"
spec:
containers:
View Jenkinsfile
#!/usr/bin/env groovy
@Library('pipeline-library')
DATABASE_NAME = env.BRANCH_NAME.replaceAll('/.', '_') + ".${env.BUILD_NUMBER}"
sharedPipeline {
appName = 'appName.example.com'
setupEnvScript = """
View Jenkinsfile
#!/usr/bin/env groovy
// FIXME: Figure out how to move these to the environment section....
env.ENV_SUFFIX = '.qa'
if (env.BRANCH_NAME == 'master') {
env.ENV_SUFFIX = ''
}
env.IMAGE_VERSION = env.BRANCH_NAME.replaceAll('/', '.') + ".${BUILD_NUMBER}${ENV_SUFFIX}"
env.DATABASE_NAME = env.IMAGE_VERSION.replaceAll('/.', '_')
View gist:c7b4cdbad652c36084f367279cb92d25
{
"Use Non-ASCII Font" : true,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.59999999999999998,
"Blue Component" : 0.73333333333333328,
"Red Component" : 0.42352941176470588
},
@REBELinBLUE
REBELinBLUE / README.md
Created May 14, 2018 — forked from ralphschindler/README.md
Docker For Mac Host Address Alias To Enable PHP XDebug (10.254.254.254 Trick)
View README.md

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254.

Once your machine has a well known IP address, your PHP container will then be able to connect to it, specifically XDebug can connect to it at the configured xdebug.remote_host.

Installation Of IP Alias (This survives reboot)

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...

View gist:1a876383b4569fc841a0e377fde4398c

install.php line 32 to 41 change the param function to

function param($name, $method)
{

    // Use ternary, check if the method exists in the super global area, ie _METHOD
    // If so return the value from that array, otherwise use the GLOBALS array
    // along with the HTTP_METHOD_VARS index to return the correct value
    return @isset($GLOBALS["_{$method}"]) ? $GLOBALS["_{$method}"][$name] : $GLOBALS["HTTP_{$method}_VARS"][$name];
View pre-commit
#!/usr/bin/env bash
echo "php-cs-fixer pre commit hook start"
PHP_CS_FIXER="./bin/php-cs-fixer"
HAS_PHP_CS_FIXER=false
if [ -x ./bin/php-cs-fixer ]; then
HAS_PHP_CS_FIXER=true
fi
View QueryStringTest.php
<?php
use PHPUnit\Framework\TestCase;
class QueryStringTest extends TestCase
{
/** @test */
public function it_can_add_parameters()
{
// Arrange
View QueryString.php
<?php
class QueryString
{
/** @var array */
private $parts = [];
/**
* @return string
*/
View Games
* 7 Wonders Duel
* Pantheon
* Messe Wonder
* Statue of Liberty Wonder
* Abandon Planet (PREORDERED)
* Bears vs Babies (PREORDERED)
* NSFW Pack
You can’t perform that action at this time.