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 | |
use Hyperf\Nano\Factory\AppFactory; | |
use Hyperf\HttpServer\Contract\RequestInterface; | |
require_once __DIR__.'/vendor/autoload.php'; | |
$app = AppFactory::create('0.0.0.0', 9051); | |
$app->post('/deployer/api/webhook/gh', function (RequestInterface $request) { |
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
wsl.exe –terminate <Distro> | |
wsl –shutdown | |
diskpart | |
select vdisk file=%appdata%\..\Local\Local\Packages\SomeWSLVendorName\LocalState\ext4.vhdx | |
compact vdisk | |
exit |
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
# For more information: https://laravel.com/docs/sail | |
version: '3' | |
services: | |
laravel.test: | |
build: | |
context: ./vendor/laravel/sail/runtimes/8.1 | |
dockerfile: Dockerfile | |
args: | |
WWWGROUP: '${WWWGROUP}' | |
image: sail-8.1/app |
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
// https://constantsolutions.dk/2020/06/delay-loading-of-google-analytics-google-tag-manager-script-for-better-pagespeed-score-and-initial-load/ | |
document.addEventListener('DOMContentLoaded', () => { | |
/** init gtm after 3500 seconds - this could be adjusted */ | |
setTimeout(initGTM, 3500); | |
}); | |
document.addEventListener('scroll', initGTMOnEvent); | |
document.addEventListener('mousemove', initGTMOnEvent); | |
document.addEventListener('touchstart', initGTMOnEvent); |
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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
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
// This file was initially generated by Windows Terminal 1.0.1401.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
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
Compilar arquivos de tradução: | |
$ apt install gettext | |
$ msgcat pt_BR.po | msgfmt -o pt_BR.mo - | |
Excluir comentários (Spam) usando CLI | |
$ wp comment delete $(wp comment list --status=spam --format=ids) | |
$ wp comment delete $(wp comment list --status=hold --format=ids) |
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
# sudo apt install python-qrtools | |
import qrtools | |
import glob | |
images = sorted(glob.glob('./images/*.png')) | |
qr = qrtools.QR() | |
for image in images: |
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
Acre|AC | |
Alagoas|AL | |
Amapá|AP | |
Amazonas|AM | |
Bahia|BA | |
Ceará|CE | |
Distrito Federal|DF | |
Espírito Santo|ES | |
Goiás|GO | |
Maranhão|MA |
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
{ | |
"states": [ | |
{ "id": 11, "name": "Rondônia", "code" : "RO" }, | |
{ "id": 12, "name": "Acre", "code" : "AC" }, | |
{ "id": 13, "name": "Amazonas", "code" : "AM" }, | |
{ "id": 14, "name": "Roraima", "code" : "RR" }, | |
{ "id": 15, "name": "Pará", "code" : "PA" }, | |
{ "id": 16, "name": "Amapá", "code" : "AP" }, | |
{ "id": 17, "name": "Tocantins", "code" : "TO" }, | |
{ "id": 21, "name": "Maranhão", "code" : "MA" }, |
NewerOlder