sudo apt-get install apache2-dev
# or yum install httpd-tools
ab -n 9999 -c 333 http://localhost:80/
(9999 nr re requisições)
(333 quantidade de vezes)
```sh
sudo apt-get install apache2-dev
# or yum install httpd-tools
ab -n 9999 -c 333 http://localhost:80/
(9999 nr re requisições)
(333 quantidade de vezes)
```sh
```zshrc | |
#▄███████▄ ▄████████ ▄█ █▄ ▄████████ ▄████████ | |
#██▀ ▄██ ███ ███ ███ ███ ███ ███ ███ ███ | |
# ▄███▀ ███ █▀ ███ ███ ███ ███ ███ █▀ | |
#▀█▀▄███▀▄▄ ███ ▄███▄▄▄▄███▄▄ ▄███▄▄▄▄██▀ ███ | |
# ▄███▀ ▀ ▀███████████ ▀▀███▀▀▀▀███▀ ▀▀███▀▀▀▀▀ ███ | |
#▄███▀ ███ ███ ███ ▀███████████ ███ █▄ | |
#███▄ ▄█ ▄█ ███ ███ ███ ███ ███ ███ ███ | |
#▀████████▀ ▄████████▀ ███ █▀ ███ ███ ████████▀ | |
# ███ ███ |
[ | |
{ | |
"value": "001", | |
"label": "Banco do Brasil S.A." | |
}, | |
{ | |
"value": "003", | |
"label": "Banco da Amazônia S.A." | |
}, | |
{ |
upload(files) { | |
const config = { | |
onUploadProgress: function(progressEvent) { | |
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
console.log(percentCompleted) | |
} | |
} | |
let data = new FormData() | |
data.append('file', files[0]) |
// mock file | |
function MockFile() { }; | |
MockFile.prototype.create = function (name, size, mimeType) { | |
name = name || "mock.txt"; | |
size = size || 1024; | |
mimeType = mimeType || 'plain/txt'; | |
function range(count) { | |
var output = ""; |
<?php | |
// generate private/public key as follows: | |
// > openssl genrsa -out private.pem 2048 | |
// > openssl rsa -in private.pem -outform PEM -pubout -out public.pem | |
$data = "String to encrypt"; | |
$privKey = openssl_pkey_get_private('file:///path/to/private.pem'); | |
$encryptedData = ""; |
<?php | |
/** | |
* Gera a paginação dos itens de um array ou collection. | |
* | |
* @param array|Collection $items | |
* @param int $perPage | |
* @param int $page | |
* @param array $options | |
* | |
* @return LengthAwarePaginator |
function sprintf(format) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
var i = 0; | |
return format.replace(/%s/g, function() { | |
return args[i++]; | |
}); | |
} |
<?php | |
class MyModel extends Eloquent { | |
public function getSql() | |
{ | |
$builder = $this->getBuilder(); | |
$sql = $builder->toSql(); | |
foreach($builder->getBindings() as $binding) | |
{ |