This file contains hidden or 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
version: '3' | |
services: | |
db: | |
build: | |
context: ./ | |
dockerfile: mysql.dockerfile | |
container_name: db-laravel | |
restart: always | |
tty: true | |
ports: |
This file contains hidden or 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:5.6-apache | |
#Instala as libs de desenvolvimento | |
RUN apt update && apt install -y \ | |
libaio1 \ | |
vim \ | |
unzip \ | |
curl \ | |
wget \ | |
build-essential \ |
This file contains hidden or 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
<?php | |
class Sql { | |
public $conn; | |
public function __construct(){ | |
return $this->conn = mysqli_connect("127.0.0.1","root","","hcode_shop"); |
This file contains hidden or 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 composer as composer | |
FROM php:VERSION | |
COPY --from=composer /usr/bin/composer /usr/bin/composer |
This file contains hidden or 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
First create the sqlite file: touch test.sqlite | |
Access the database file using the sqlite: sqlite3 test.sqlite | |
Listing of the tables: .tables | |
Creating the table of users: create table users(id int, name varchar(255), email varchar(255)); | |
This file contains hidden or 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
1. First make the download the Go installer: curl -k https://go.dev/dl/go1.19.4.linux-amd64.tar.gz -o go.1.19.14.linux-amd64.tar.gz | |
2. You need remove any previous Go installation (if it exists), and then extract the file downloaded before: rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz | |
3. Add the go PATH in PATH environment variable: export PATH=$PATH:/usr/local/go/bin | |
4. Open the profile file: vim ~/.profile | |
5. In the end profile file add the go PATH: PATH=$PATH:/usr/local/go/bin | |
6. Install de protocol buffter compiler: apt install protobuf-compiler | |
7. Install the go plugins for working with gRPC: | |
go install google.golang.org/protobuf/cmd/[email protected] | |
go install google.golang.org/grpc/cmd/[email protected] | |
8. Update your PATH with protoc complier can find the plugins: |
This file contains hidden or 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
swagger: "2.0" | |
info: | |
description: "Prover acesso ao recurso de usuários." | |
version: "0.0.1" | |
title: "Lista de Usuários" | |
termsOfService: "http://swagger.io/terms/" | |
contact: | |
name: Paulo | |
email: "[email protected]" | |
license: |
This file contains hidden or 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
npm init -y | |
npm i typescript [email protected] @types/node @types/[email protected] [email protected] --save-dev | |
This file contains hidden or 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 firstAttack() { | |
if [monsterA.speed == monsterB.speed] then | |
if[monsterA.attack > monsterB.attack] then | |
monsterAttack = monsterA | |
monsterDefense = monsterB | |
else | |
monsterAttack = monsterB | |
monsterDefense = monsterA | |
fi | |
else if [monsterA.speed > monsterB.speed] then |
This file contains hidden or 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
names = ['Maria', 'João', 'Jose', 'Cleiton', 'Pedro'] | |
for name in names: | |
print(name) |