Discover which services are running locally
sudo netstat -plunt
The association between ports and services are listed in this file
Bringing machine 'homestead' up with 'virtualbox' provider... | |
==> homestead: Importing base box 'laravel/homestead'... | |
[KProgress: 10% | |
[KProgress: 90% | |
[K==> homestead: Matching MAC address for NAT networking... | |
==> homestead: Checking if box 'laravel/homestead' version '14.0.2' is up to date... | |
==> homestead: Setting the name of the VM: homestead | |
==> homestead: Clearing any previously set network interfaces... | |
==> homestead: Preparing network interfaces based on configuration... |
Consider books and owners. A book can exist without an owner or change owner. The relationship between a book and owner is non-identifying. The primary key of the parent is included in the child but not as part of the child's primary key.
Consider books and chapters. A chapter only exists when a book exists. The relationship between a book and its chapters is an identifying relationship. The primary key of the parent is included in the primary key of the child entity.
When no mysql tools are available locally, use mysqldump from inside a docker container to backup a remote database.
docker run -it --rm -e MYSQL_PWD=<user pass> mysql:5.7 mysqldump -u <user> -h <ip address> -P 3306 database 1> backup.sql
#!/bin/bash | |
# Contents of create-table.sql | |
# | |
# CREATE TABLE `csv` ( | |
# `id` int(11) NOT NULL AUTO_INCREMENT, | |
# PRIMARY KEY (`id`) | |
# ); | |
mysql -u user -ppassword < create-table.sql |
The pre-defined step I fill in "field" with "text"
removes focus from the input element and does not hold open the suggestion list. The step definition below resolves this issue.
And I fill in "autocomplete-ajax" with "J" maintaining focus
/**
* @Given I fill in :arg1 with :arg2 maintaining focus
*/
Only add the xdebug.remote_log
line if you need to troubleshoot.
FROM php:7.1-apache
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
<?php | |
use App\Entity\Post; | |
use Symfony\Component\Routing\Annotation\Route; | |
/** | |
* @Route("/post") | |
*/ | |
class PostController extends Controller | |
{ |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bookmarks</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> |