Skip to content

Instantly share code, notes, and snippets.

version: "3"
services:
mysql:
image: mysql:5.7
volumes:
- "./data/db:/var/lib/mysql:delegated"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
<?php
return [
0 => [
'size' => '2x3',
'width' => '2',
'height' => '3',
'print' => 'S',
'bagged-print' => 'S',
'torn-edge-prints' => 'S',
'weighted-matted-prints' => 'S',
<?php
namespace Bree\Features\Cart;
use Bree\Cart\Cart;
use Bree\Product\Box;
use Bree\Exceptions\BoxNotFoundException;
class MaybeAddBoxesToCart
<?php
namespace Tests\Feature\Cart;
use Bree\Features\Cart\MaybeAddBoxesToCart;
use Tests\TestCase;
use Mockery as m;
use function Bree\boot_without_features;
@chillbits-legacy
chillbits-legacy / main.js
Created December 21, 2020 08:28
Mount Vue app on multiple DOMs
import { createApp } from 'vue'
import store from './store'
import Rita from './Rita.vue'
import './index.css'
const mounts = document.querySelectorAll('.rita')
let Apps = []
;[].forEach.call(mounts, (mount, index) => {
if ('object' === typeof mount) {
<?php
namespace Tests\Unit;
use Illuminate\Contracts\Container\BindingResolutionException;
use Tests\TestCase;
use function Brain\Monkey\Functions\when;
use function Bree\boot;
use function Bree\app;
<?php
Class Test {
public function test_update_order_status_but_get_unexpected_response()
{
$response = '<html random tag from server>';
$this->mockingHttpClientWith($response);
$service = new WebsiteService();
$order = $this->getCompletedOrder();
40.94.225.43
40.94.225.75
40.94.225.54
40.107.197.12
40.94.225.93
40.94.225.84
40.94.225.99
40.94.225.92
40.94.105.43
40.107.199.3
VERSION=$1
wget https://phar.phpunit.de/phpunit-$VERSION.phar
chmod +x phpunit-$VERSION.phar
sudo mv phpunit-$VERSION.phar /usr/local/bin/phpunit
phpunit -v
@chillbits-legacy
chillbits-legacy / selected-detect.js
Created November 23, 2016 05:23
Detect & add class for your dropdown select element before & after chosen value.
function colorizeSelect(){
if($(this).val() == "0") $(this).addClass("empty");
else $(this).removeClass("empty")
}
$("select").on('change keyup', colorizeSelect).change();