Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* Print out a stack trace from entry point to wherever this function was called. | |
* @param boolean $show_args Show arguments passed to functions? Default False. | |
* @param boolean $for_web Format text for web? Default True. | |
* @param boolean $return Return result instead of printing it? Default False. | |
*/ | |
public static function stack_trace($show_args=false, $for_web=true, $return=false){ | |
if ($for_web){ | |
$before = '<b>'; |
@(elements: views.html.helper.FieldElements) | |
@************************************************** | |
* Generate input according twitter bootsrap rules * | |
**************************************************@ | |
<div class="input-group @elements.args.get('_class) @if(elements.hasErrors) {has-error}" id="@elements.args.get('_id).getOrElse(elements.id + "_field")"> | |
<label class="sr-only" for="@elements.id">@elements.label(elements.lang)</label> | |
@elements.input | |
<div class="control-label" for="@elements.id">@elements.errors(elements.lang).mkString(", ")</div> |
Adyen Test Card Numbers | |
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform. | |
For all cards use the following expiration and CVV2/CVC2/or CID for Amex. | |
For all cards: | |
Expiration Dates CVV2 / CVC3 CID (American Express) | |
08/2018 OR 10/2020 737 7373 |
System.setProperty("webdriver.chrome.driver", | |
"/opt/tools/selenium-2.45.0/chromedriver"); | |
File addonpath = new File( | |
"/opt/tools/selenium-2.45.0/innpjfdalfhpcoinfnehdnbkglpmogdi.crx"); | |
ChromeOptions options = new ChromeOptions(); | |
options.addExtensions(addonpath); | |
DesiredCapabilities capabilities = new DesiredCapabilities(); | |
capabilities.setCapability(ChromeOptions.CAPABILITY, options); |
There are two metrics that are important to consider when discussing the size of Docker images.
The example commands shown below will work on Windows, MacOS, and Linux.
with.ga | |
from.gq | |
your.gq | |
other.gq | |
they.cf | |
they.gq | |
their.ml | |
their.ga | |
their.cf | |
their.gq |
// when T is any|unknown, Y is returned, otherwise N | |
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
// when T is never, Y is returned, otherwise N | |
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
// when T is a tuple, Y is returned, otherwise N | |
// valid tuples = [string], [string, boolean], | |
// invalid tuples = [], string[], (string | number)[] |