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
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
<?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 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
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 mysql:5.7 | |
RUN usermod -u 1000 mysql |
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 nginx:1.19.1-alpine | |
RUN apk add bash | |
RUN rm /etc/nginx/conf.d/default.conf | |
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf |
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:7.4.8-fpm-alpine3.12 | |
RUN apk add --no-cache shadow bash mysql-client | |
RUN docker-php-ext-install pdo pdo_mysql | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
WORKDIR /var/www |
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
const fs = require('fs').promises; | |
const fsSync = require('fs'); | |
const path = require('path'); | |
const REGEX_REPLACE =/([\u0300-\u036f]|[^0-9a-zA-Z])/g; | |
/** | |
* PATH: Constante a ser definida onde possui os arquivos. | |
*/ | |
const PATH = 'path-to-files'; | |
/** |
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 fibonacci(number){ | |
let term = number; | |
let penultimate = 0, last = 1; | |
let result = 0; | |
if (term <= 2) { | |
result = term - 1; | |
} else { | |
for( let i = 3; i<= term; i++){ | |
result = last + penultimate; | |
penultimate = last; |