PHP | Laravel | Web Scraping
A curated list of amazingly awesome PHP libraries, resources and shiny things.
| #!/bin/bash | |
| # Adicione um novo remote; pode chamá-lo de "upstream": | |
| git remote add upstream https://github.com/usuario/projeto.git | |
| # Obtenha todos os branches deste novo remote, | |
| # como o upstream/master por exemplo: | |
| git fetch upstream |
| On Linux (or WSL) set 'host.docker.internal: host-gateway' in the PHP service in docker-compose.yml: | |
| dns: | |
| - 172.16.238.100 | |
| # MacOS and Windows have this by default, this hack also allows it for Linux | |
| extra_hosts: | |
| docker.for.lin.host.internal: 172.16.238.1 | |
| docker.for.lin.localhost: 172.16.238.1 | |
| host.docker.internal: host-gateway | |
| ## SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc) | |
| ### Create a repo. | |
| Make sure there is at least one file in it (even just the README.md) | |
| ### Generate a SSH key pair (private/public): | |
| ``` | |
| ssh-keygen -t rsa -C "[email protected]" |
| PHP PDO MySQL Cheat sheet guide | |
| PDO is a PHP extension for accessing and interacting with databases using object-orientation. As PDO is targetted for executing queries with prepared statements it is (with correct usage) safer than MySQLi. | |
| This PHP PDO cheat sheet goes through methods of creating a connection, SELECT, INSERT, UPDATE and DELETE queries. | |
| Features include: Select if exists, insert update on duplicate, insert short form from an array, return last id and amount of rows affected by the last query. | |
| View on GitHub here. | |
| Creating the database connection |
Fonte: https://medium.com/trainingcenter/utilizando-o-fluxo-git-flow-e63d5e0d5e04
Se você já trabalha com o git como principal ferramenta de controle de versão, já deve ter visto várias abordagens de como utilizar e controlar branchs em um cenário de produção ou pessoal. E se você é novo com git, este fluxo irá te ajudar a ter maior familiaridade de como empresas, projetos opensource costumam utilizar seus fluxos de trabalho. É muito comum vermos pessoas utilizando somente um branch para fazer commits em projetos pessoais. Isto não é errado, é muito tranquilo de se controlar tudo em uma branch quando se está desenvolvendo sozinho, mas o cenário muda bastante quando temos que interagir com mais desenvolvedor ou contribuidores, seja em um projeto opensource ou privado. Nessas horas é suma importância que se tenha total controle do que está sendo produzido por sua equipe, onde, a