sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt update && sudo apt install apt-transport-https ca-certificates curl software-properties-common && | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && apt update -y | |
sudo apt install docker-ce -y | |
sudo systemctl status docker |
# how to install supervisor | |
apt install supervisor | |
# how to create config file supervisor | |
nano /etc/supervisor/conf.d/laravel-worker.conf | |
# set text in file, save and restart service | |
# service supervisor restart | |
[program:laravel-worker] |
find / -type f -size +1G -exec du -h {} + | sort -rh | head -n 1 |
docker rm -vf $(docker ps -aq) | |
docker rmi -f $(docker images -aq) | |
docker volume prune -f | |
// DOT NOT USE IS COMMAND IN PRODUCTION // | |
// IS ERASE YOUR FILES! AND VOLUMES! // |
#! /bin/bash | |
MEMORY=$(free -m | awk 'NR==2{printf "%6.2f%%", $3*100/$2 }') | |
DISK=$(df -h | awk '$NF=="/"{printf "%6s", $5}') | |
CPU=$(top -bn1 | grep load | awk '{printf "%6.2f%%", $(NF-2)}') | |
MESSAGE="*Servidor*\n-----\n*Servidor:* APIS\n*Memória*: $MEMORY\n*Disco*:$DISK\n*CPU:*$CPU" | |
curl --location 'https://gateway.apibrasil.io/api/v2/whatsapp/sendText' \ | |
--header 'Content-Type: application/json' \ | |
--header 'DeviceToken: YOUR_DEVICE_TOKEN' \ |
# instala persiste | |
sudo apt-get install iptables-persistent | |
# lista portas | |
sudo iptables -L | |
# libera tudo | |
iptables -P INPUT ACCEPT | |
iptables -P OUTPUT ACCEPT | |
iptables -P FORWARD ACCEPT |
/* | |
* This sketch demonstrates how to scan WiFi networks. | |
* The API is almost the same as with the WiFi Shield library, | |
* the most obvious difference being the different file you need to include: | |
*/ | |
#include "WiFi.h" | |
#include "BluetoothSerial.h" | |
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) | |
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it |
#include "WiFi.h" | |
void setup() | |
{ | |
Serial.begin(115200); | |
// Set WiFi to station mode and disconnect from an AP if it was previously connected | |
WiFi.mode(WIFI_STA); | |
WiFi.disconnect(); | |
delay(100); |
Google has made it really easy to create api credentials for own use, just follow these few steps:
drive api
in the search bar and select Google drive api
under the marketplace section [screenshot]Google Drive API
button [screenshot]Credentials
menu itemConfigure Consent Screen
button [screenshot]