- Install stud
$ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
- Download and install the powssl script
$ curl https://raw.github.com/gist/2050941/3ea59efe8c7e9013c265313045a9fdda5c653963/powssl > ~/bin/powssl
$ chmod +x ~/bin/powssl
- Run powssl to create development certificate and configure stud.
$ powssl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @throws AdressApiDown | |
*/ | |
public function validate($value, Constraint $constraint): void | |
{ | |
try { | |
if ($someService->checkValue($value)) { | |
$this->context | |
->buildViolation($constraint->message) | |
->addViolation(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM frolvlad/alpine-python3 | |
RUN apk add --update make gcc git python3-dev musl-dev libffi-dev openssl-dev py-pip | |
RUN pip install -r requirements.txt | |
COPY . /app | |
WORKDIR /app | |
ENTRYPOINT pytest config-test/ -s --env= | |
// Run with | |
// docker run <container> $TEST_ENV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists('dd')) | |
{ | |
/** | |
* Dump the passed variables and end the script. | |
* | |
* @param mixed | |
* @return void | |
*/ | |
function dd() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ($form['submitted'] as &$value) { | |
$types = array('textfield', 'webform_email', 'textarea'); | |
if (isset($value['#type']) && in_array($value['#type'], $types)) { | |
$value['#attributes']['placeholder'] = $value['#title']; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Jonathan Barronville | |
* @example | |
* var color_001 = colorShader( '000000', 255 ); | |
* // color_001 === 'ffffff'; | |
* var color_002 = colorShader( 'ffffff', -255 ); | |
* // color_002 === '000000'; | |
* @param {String} color_hex | |
* @param {Number} amount | |
* @return {String} |