/**
* @OA\Post(
* tags={"Files"},
* description="Envia os arquivos especificados para o servidor.",
* path="/files/upload",
* security={{"bearerAuth":{}}},
* @OA\RequestBody(
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
Cities::create([ | |
'cod' => '11', | |
'uf_name' => 'Rondônia', | |
'city' => "Alta Floresta D'Oeste", | |
]); | |
Cities::create([ | |
'cod' => '11', | |
'uf_name' => 'Rondônia', | |
'city' => "Ariquemes", |
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 | |
exec('openssl enc -aes-256-cbc -pbkdf2 -k 102030 -in /mnt/c/Lixo/a.enc.txt -out /mnt/c/Lixo/b.txt');// Encrypt | |
exec('openssl enc -aes-256-cbc -pbkdf2 -k 102030 -d -in /mnt/c/Lixo/a.enc.txt -out /mnt/c/Lixo/b.txt');// Decrypt | |
/** | |
É nescessário possuir o OpenSSL no computador, se for windows, basta realizar o download dos seguintes arquivos e adicionar a um diretório que esteja na path do sistema. | |
https://host.sisecf.app/arquivos/openssl/msys-crypto-1.1.dll | |
https://host.sisecf.app/arquivos/openssl/msys-ssl-1.1.dll | |
https://host.sisecf.app/arquivos/openssl/openssl.exe | |
ou |
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
echo Preparando...... | |
sudo mkdir /home/downloads | |
cd /home/downloads | |
sudo chmod -R 777 /home/downloads | |
#echo Google Chrome | |
get https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i ./google-chrome-stable_current_amd64.deb | |
sudo rm ./google-chrome-stable_current_amd64.deb |
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
# Use admin/pass as user/password credentials to login to openemr (from OE_USER and OE_PASS below) | |
# MYSQL_HOST and MYSQL_ROOT_PASS are required for openemr | |
# FLEX_REPOSITORY and (FLEX_REPOSITORY_BRANCH or FLEX_REPOSITORY_TAG) are required for flex openemr | |
# MYSQL_USER, MYSQL_PASS, OE_USER, MYSQL_PASS are optional for openemr and | |
# if not provided, then default to openemr, openemr, admin, and pass respectively. | |
version: '3.1' | |
services: | |
mysql: | |
restart: always |
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 | |
namespace App\Http\Controllers\Api; | |
use App\Model; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Pagination\LengthAwarePaginator as Paginator; | |
Have the function LongestWord(sen) take the sen parameter being passed and return the longest word in the string. If there are two or more words that are the same length, return the first word from the string with that length. Ignore punctuation and assume sen will not be empty. Words may also contain numbers, for example "Hello world123 567"
Faça com que a função LongestWord(sen) pegue o parâmetro sen que está sendo passado e retorne a palavra mais longa na string. Se houver duas ou mais palavras com o mesmo comprimento, retorne a primeira palavra da string com esse comprimento. Ignore a pontuação e assuma que sen não estará vazio. As palavras também podem conter números, por exemplo "Hello world123 567"
<?php
function LongestWord($sen) {
$return = '';
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
#!/usr/bin/env sh | |
# ASCII: http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Docker%20Setup%20Script | |
# SOURCE: https://gist.github.com/Gerst20051/bf1341448bd43f430761c1f8150fb1b7 | |
function double_echo { | |
echo && echo | |
} | |
function newline { |
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 | |
// Your goal is to count how many items exist that have an age equal to or greater than 50, and print this final value. | |
$ch = curl_init('https://coderbyte.com/api/challenges/json/age-counting'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
$data = curl_exec($ch); | |
curl_close($ch); |