Skip to content

Instantly share code, notes, and snippets.

View enniosousa's full-sized avatar

Ennio Sousa enniosousa

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Parent Document</title>
<script>
/**
* @link https://dev.to/admitkard/google-docs-url-tricks-and-tips-4d44
* @link https://web.archive.org/web/20240523160018/https://dev.to/admitkard/google-docs-url-tricks-and-tips-4d44
*/
@enniosousa
enniosousa / README.md
Created February 11, 2023 14:54 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
<?php
namespace App\Support\Request;
use Illuminate\Http\Testing\MimeType;
use Illuminate\Support\Str;
use Illuminate\Support\Arr;
use Illuminate\Validation\Validator ;
use Symfony\Component\HttpFoundation\File\UploadedFile;
version: "3"
services:
vscode:
container_name: vscode"
hostname: vscode
image: codercom/code-server
environment:
PASSWORD: devingongoogle
@enniosousa
enniosousa / nps-auto.sh
Created August 3, 2020 22:59
Install Google Pagespeed Module on Nginx running on aaPanel
#!/bin/bash
Green_font="\033[32m" && Yellow_font="\033[33m" && Red_font="\033[31m" && Font_suffix="\033[0m"
Info="${Green_font}[Info]${Font_suffix}"
Error="${Red_font}[Error]${Font_suffix}"
NGX_DIR=/www/server/nginx
NPS_VESION=1.13.35.2-stable
echo -e "${Green_font}
#=======================================
# Project: nps-auto
@enniosousa
enniosousa / clean-header.php
Last active March 30, 2023 21:26
Clear Wordpress head removing meta tags, styles and scripts
<?php
/*
* Name: wordpress assist clean header
* Source: https://gist.github.com/Auke1810/f2a4cf04f2c07c74a393a4b442f22267
* Date: 2020-07-25
*/
remove_action('wp_head', 'rsd_link'); // remove really simple discovery link
remove_action('wp_head', 'wp_generator'); // remove wordpress version
@enniosousa
enniosousa / git-update-fork.sh
Created September 30, 2019 14:55 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream

Instalar

Instruções de como instalar aqui https://github.com/FiloSottile/mkcert

Converter Root Certificate Autorirarity (do arquivo .pem para .pfx, ou outros

No Ubuntu o root CA gerado é no arquivo .pem, e o Windows não aceita este formato, por isso usar o .pfx. O site sslshopper.com faz isto online, mas é recomendado fazer pelo openssl.

cd ~/.local/share/mkcert
openssl pkcs12 -export -out rootCA.pfx -inkey rootCA-key.pem -in rootCA.pem

Baixe o arquivo rootCA.pfx gerado para importação no Windows.

@enniosousa
enniosousa / Laravel Authentication with MD5 Hasher instead of Bcrypt.md
Last active June 8, 2022 06:49
Laravel Authentication with MD5 Hasher instead of Bcrypt

Tested with Laravel 5.8

1. Create the class Md5Hasher into folder app/Hashers

<?php

namespace App\Hashers;

use Illuminate\Contracts\Hashing\Hasher;