Skip to content

Instantly share code, notes, and snippets.

View enniosousa's full-sized avatar

Ennio Sousa enniosousa

View GitHub Profile
@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 / 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
@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;
<?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 / 1. Install Ubuntu Web Server.md
Last active January 6, 2020 13:36
Install LAMP (Linux Apache MySQL and PHP 7.3), Composer and SQL Server PHP PDO Driver
@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