drop table if exists folder;
create table folder (
id INTEGER primary key AUTOINCREMENT, -- Primary key for the folder, automatically incremented
name TEXT not null, -- Name of the folder
parent_id INTEGER, -- Foreign key referencing the parent folder
foreign key (parent_id) references folder (id) -- Self-referencing foreign key
);
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
import Echo from 'laravel-echo'; | |
import Pusher from 'pusher-js'; | |
import axios from 'axios'; | |
const token = 'your-access-token' | |
const authUrl = 'your-api-url/api/broadcasting/auth' | |
const pusherKey = 'your-pusher-key' | |
const pusherCluster = 'mt1' | |
const userId = 1 | |
const privateChannel = 'App.Models.User.' + userId |
Ciência de dados: https://chat.whatsapp.com/GtcQbzWDvzTCzK8gZMoFot
GRUPO FARMÁCIA RS: https://chat.whatsapp.com/BiouyLZBC9GCCj9HQwDgbP
GRUPO ENGENHARIA DE SOFTWARE: https://chat.whatsapp.com/GjKRr6QkBCO01wPqxiPFyj
GRUPO DE ADM:
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
DROP FUNCTION IF EXISTS BIG_SEC_TO_TIME; | |
DELIMITER $$ | |
CREATE FUNCTION BIG_SEC_TO_TIME(SECS BIGINT) | |
RETURNS TEXT | |
READS SQL DATA | |
DETERMINISTIC | |
BEGIN | |
DECLARE HEURES TEXT; | |
DECLARE MINUTES CHAR(5); | |
DECLARE SECONDES CHAR(5); |
flatten(array $array, $keyPrefix = ''): array
{
$return = [];
foreach ($array as $key => $value) {
$key = trim($keyPrefix . '_' . $key, '_');
if (is_array($value)){
$return = array_merge($return, flatten($value, $key));
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
certbot certonly \ | |
--manual \ | |
--preferred-challenges=dns \ | |
--email [email protected] \ | |
--server https://acme-v02.api.letsencrypt.org/directory \ | |
--agree-tos \ | |
-d *.your-domain.com -d our-domain.com |
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
/** | |
* Script simples para importação de dados de cotação da Bovespa | |
* | |
* Requisitos: | |
* - Node.js instalado | |
* - instalar as dependencias: npm install extract-zip moment request | |
* | |
* Exemplo de uso: node script_simples_importaca_cota_hist_bovespa.js 05022019 | |
* | |
* Post relacionado: https://albertosouza.net/artigos/22-importando-dados-bovespa |
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
alias a="php artisan" | |
alias lc="php artisan config:clear && php artisan view:clear && php artisan cache:clear && php artisan route:clear && composer dumpautoload" | |
alias cda="composer dumpautoload" | |
alias g="git" | |
alias gc="git add . && git commit -m" | |
alias dev="~/Documents/dev" | |
alias p="pstorm" | |
alias c="composer" | |
alias cr="composer require" |
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
<?php | |
$ofx = $argv[1] ?? null; | |
if (! $ofx) | |
echo 'Origin file missing'; | |
$output = $argv[2] ?? 'extrato.csv'; | |
$ofx = @file_get_contents($ofx); |
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 { | |
# Porta WEB | |
listen 80; | |
listen [::]:80; | |
# Nome do servidor | |
server_name example.com; | |
# Diretorio de Log | |
access_log /var/log/nginx/access.log; |
NewerOlder