Definitions
- Total
- Used
- Shared
- Buff/Cache - File pages mapped into memory
- Free - It's not been used at all
- Available - It's been used for performance only, the Kernel can reclaim it anytime
Memory Types
#!/usr/bin/env node | |
// Inputs variáveis | |
const scaleOut = 0.65; | |
const scaleIn = 0.35; | |
const minTasks = 1; | |
const maxTasks = 6; | |
// Função para formatar percentuais | |
const formatPercent = (num) => `${(num * 100).toFixed(1)}%`; |
Definitions
Memory Types
# Install dependences without the dev-only | |
npm install --omit=dev | |
composer install --no-dev -o | |
# Cache all the Laravel and Composer entities | |
php artisan route:cache | |
php artisan optimize | |
php artisan config:cache | |
composer dump-autoload --optimize |
const sortTableByColumn = (tableSelector, columnIndex) => { | |
const rows = document.querySelector(tableSelector) | |
.querySelectorAll(':scope > tbody > tr') | |
const getCellTextByPosition = row => { | |
const cell = row.querySelector(`:scope > *:nth-child(${columnIndex})`) | |
return cell == null ? '' : cell.innerText | |
} |
# If I already have Python on WSL, do I need to install it also on Windows to use in applications and Powershell? No: | |
function WslPython { wsl -e python3 } | |
New-Alias -Force -Name python -Value WslPython | |
# So I'm able to run Python in Windows by: python --version |
name: appname | |
networks: | |
internal: | |
database: | |
services: | |
nginx: | |
build: | |
context: . |
server { | |
listen 0.0.0.0:80; | |
index index.php index.html; | |
root /app/public; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { |
<?php | |
# FileName should be "call", without extension. A calling in cli like "php call google.com" | |
enum Color: string | |
{ | |
case Black = "\033[30m"; | |
case Red = "\033[31m"; | |
case Green = "\033[32m"; | |
case Orange = "\033[33m"; |