Skip to content

Instantly share code, notes, and snippets.

@DenisJunio
DenisJunio / install_php_8_1.sh
Last active April 15, 2024 02:27
Laravel - PHP 8.1 Extensions - Ubuntu
#!/bin/bash
sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt upgrade -y
sudo apt install php8.1 -y
sudo apt install php8.1-bcmath -y
sudo apt install php8.1-bz2 -y
sudo apt install php8.1-cli -y
sudo apt install php8.1-common -y
sudo apt install php8.1-curl -y
@DenisJunio
DenisJunio / 2021_11_29_151145_change_ids_in_action_events_table.php
Created November 29, 2021 18:21
Change IDs in Action Events("action_events") Table - Laravel Nova UUID support
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ChangeIdsInActionEventsTable extends Migration
{
/**
* Run the migrations.
@DenisJunio
DenisJunio / nginx-wordpress.conf
Created September 14, 2020 20:21 — forked from nfsarmento/nginx-wordpress.conf
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@DenisJunio
DenisJunio / functions-mu-encryption.php
Created February 17, 2020 19:21 — forked from muhammad-naderi/functions-mu-encryption.php
Wordpress encrypt usermeta data database
<?php
/**
* Created by PhpStorm.
* User: Muhammad
* Date: 05/07/2016
* Time: 01:20 PM
*/
add_filter('get_user_metadata', 'decrypt_user_meta',10,4);
@DenisJunio
DenisJunio / write_log.php
Created January 10, 2020 17:48
WordPress Debug - function "write_log"
<?php
if ( ! function_exists( 'write_log' ) ) {
/**
* Write Log.
*
* @param string|array|object $log Log.
*/
function write_log( $log ) {
if ( true === WP_DEBUG ) {
if ( is_array( $log ) || is_object( $log ) ) {