This file contains 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 php:8.0-fpm | |
# Arguments defined in docker-compose.yml | |
ARG user | |
ARG uid | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
curl \ |
This file contains 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
$ composer create-project --prefer-dist laravel/laravel project-name | |
$ cd project-name | |
$ sudo chown -R $USER:$USER . | |
https://phpdocker.io/generator | |
$ docker-compose up -d | |
$ docker exec -it container-name chgrp -R www-data storage bootstrap/cache | |
$ docker exec -it container-name chmod -R ug+rwx storage bootstrap/cache |
This file contains 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
function git () { | |
(docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git "$@") | |
} | |
function composer () { | |
(docker run -ti --rm -v $(pwd):/app composer "$@") | |
} | |
function php56 () { | |
(docker run -ti --rm -v $(pwd):/app php:5.6-cli "$@") |
This file contains 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
server { | |
listen 80; | |
server_name domain.com.br; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://127.0.0.1:8181; |
- Setup Your Socks Proxy
ssh -D 127.0.0.1:1080 [email protected] -p 2002
- Add The Proxy to Your SSH Config
Add this to your ~/.ssh/config:
Host bitbucket.org IdentityFile ~/.ssh/gitkey
This file contains 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
CREATE TABLE orders ( | |
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, | |
total DECIMAL(8,2) NOT NULL, | |
delivery_date DATE NOT NULL, | |
status SMALLINT(6) NOT NULL DEFAULT '0', | |
client_id INT(10) UNSIGNED NOT NULL, | |
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP | |
); |
This file contains 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 you’ve ever used Git in windows, you may have seen something like this every time you add files to Git: | |
warning: LF will be replaced by CRLF in www/index.html. | |
The file will have its original line endings in your working directory. | |
warning: LF will be replaced by CRLF in www/templates/dash.html. | |
The file will have its original line endings in your working directory. | |
If you want to turn it off, type this: | |
git config --global core.safecrlf false |
This file contains 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
POST /questoes_sf/questao/_search | |
{ | |
"size": 0, | |
"query": { | |
"term": { | |
"instituicao.dominio": "na" | |
} | |
}, | |
"aggs": { | |
"group_by_comparador": { |
This file contains 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
Instalação do GIT no ubuntu: | |
sudo apt-get install git-core git-svn ssh gitk | |
ssh-keygen -t rsa | |
git config --global user.name "Arthur Moura Carvalho" | |
git config --global user.email "[email protected]" | |
git config --global color.status "auto" | |
git config --global color.branch "auto" | |
git config --global color.interactive "auto" | |
git config --global color.diff "auto" |
NewerOlder