Skip to content

Instantly share code, notes, and snippets.

View jhowbhz's full-sized avatar
馃
Um programador apaixonado pelo que faz

Jhon jhowbhz

馃
Um programador apaixonado pelo que faz
View GitHub Profile
@jhowbhz
jhowbhz / Google Chrome Stable 64 bits
Created March 15, 2023 02:56
Google Chrome Stable 64 bits
sudo apt install gdebi
Instale o Google Chrome Stable 64 bits:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo gdebi google-chrome*
@jhowbhz
jhowbhz / Expanding-disk-in-Ubuntu.md
Last active June 26, 2023 15:58
Expanding-disk-in-Ubuntu

Como expandir uma parti莽茫o / Ubuntu

!!! N脙O ESQUE脟A DE FAZER O BACKUP ANTES DE TUDO !!!

df -hT

Isso pode ser 煤til para verificar a disponibilidade de dispositivos de armazenamento

@jhowbhz
jhowbhz / nginx_server_block
Last active February 9, 2023 02:00
SEO nginx to 80% Google Page Speed
# Thanks
# https://www.digitalocean.com/community/tutorials/how-to-increase-pagespeed-score-by-changing-your-nginx-configuration-on-ubuntu-16-04
server {
listen 80 default_server;
listen [::]:80 default_server;
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
@jhowbhz
jhowbhz / sendText.md
Last active February 9, 2025 04:58
Exemplo simples em PHP de como enviar mensagens de texto v2

Vejam abaixo um exemplo simples de como enviar mensagens de texto utilizando a APIBRASIL.

Para obter o bearer token voc锚 deve fazer login

https://gateway.apibrasil.io/api/v2/login

sendtext.php

<?php
$curl = curl_init();
@jhowbhz
jhowbhz / CONFIG.md
Created December 16, 2022 15:30 — forked from rdeavila/CONFIG.md
Apache: Como configurar um VirtualHost com proxy reverso

Apache: Como configurar um VirtualHost com proxy reverso

Instala biblioteca do Apache

sudo apt-get install libapache2-mod-proxy-html

Habilita os m贸dulos no Apache

@jhowbhz
jhowbhz / gist:8aad5db7a5ad0c72810d50bb2a4eb04f
Last active November 18, 2022 20:12
memoria swap linux
sudo swapon --show
sudo fallocate -l 25G /swapfile1
ls -lh /swapfile1
sudo chmod 600 /swapfile1
ls -lh /swapfile1
sudo mkswap /swapfile1
sudo swapon /swapfile1
sudo swapon --show
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile1 none swap sw 0 0' | sudo tee -a /etc/fstab
@jhowbhz
jhowbhz / for_ubuntu.sh
Last active November 8, 2022 20:50
Limit CPU use Mysql 100% CPU
sudo apt install cpulimit htop
cpulimit -e mysqld -l 50 &
htop
@jhowbhz
jhowbhz / redis
Created October 19, 2022 01:36
READONLY You can't write against a read only replica.
redis-cli -h 127.0.0.1 -p 6379 slaveof no one
@jhowbhz
jhowbhz / Guzzle Digest Authentication.php
Created October 18, 2022 00:09
Guzzle Digest Authentication
$response = Http::withDigestAuth($username, $pass)
->withHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
])
->withOptions([
'verify' => false,
'query' => [
'info_type' => 'number,type,slot,iccid,imei,signal',
'port' => '28,29,30'
@jhowbhz
jhowbhz / directory ssh
Created October 14, 2022 00:39
Change repo HTTP to SSH
git remote -v
git remote set-url origin https://github.com/user/repo2.git
git remote -v