Skip to content

Instantly share code, notes, and snippets.

View NeftaliYagua's full-sized avatar

Neftalí Yagua NeftaliYagua

View GitHub Profile

Laravel Permissions Fix Script

A simple bash shell script to update Laravel files and folders group permission with SELinux

TO RUN (after logging in to your server using SSH):

1. Navigate to laravel directory

cd /var/www/laravel
@startuml
title "Diagrama de Red"
nwdiag {
network Frontend {
address = "x.x.x.0/32";
internal;
backend [address = ".x"];
portal [address = ".x"];
// define group
group IIS {
@NeftaliYagua
NeftaliYagua / Roles.php
Created May 17, 2024 13:26
Ejemplo de Enum implementando interfaces externas de abstracción de datos
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasIcon;
use Filament\Support\Contracts\HasLabel;
use Illuminate\Support\Facades\Log;
enum Roles: int implements HasLabel, HasIcon, HasColor
$("form").on('submit', async function (evt) {
evt.preventDefault();
const result =await basic.croppie('result', { type: 'base64', size: 'viewport'});
$('#base64_image').val(result);
this.submit();
});
cd dev/capsi
git pull origin main -q
git archive --format=tar.gz -o /tmp/capsi.tar.gz --prefix=./ main
sudo rm -rf /var/www/capsi
sudo mkdir /var/www/capsi
cd /var/www/capsi
sudo tar -xvf /tmp/capsi.tar.gz
sudo usermod -a -G www-data ubuntu
sudo chown -R ubuntu:www-data /var/www/capsi
sudo find /var/www/capsi -type f -exec chmod 644 {} \;
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>TomcatServer</id>
<username>admin</username>
<password>password</password>
</server>
</servers>
@NeftaliYagua
NeftaliYagua / server.xml
Created April 8, 2024 19:55
Tomcat SSL Letsencript
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateFile="conf/cert.pem"
certificateKeyFile="conf/privkey.pem"
certificateChainFile="conf/chain.pem" />
</SSLHostConfig>
</Connector>
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=simple
EnvironmentFile=/opt/tomcat/tomcat.conf
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
RemainAfterExit=yes
@NeftaliYagua
NeftaliYagua / VisioPro2019 Retail Key
Created March 26, 2024 20:20 — forked from rajibdpi/VisioPro2019 Retail Key
Microsoft visio pro 2019 retail key
Key: J7VCN-9HKFP-HGHJT-D4HCC-4RJMX
Description: Office19_RTM19_VisioPro2019R_Retail
Key: YNJDD-FGPX4-XRJV8-XKQJT-KTQ4K
Description: Office19_RTM19_VisioPro2019R_Retail
check http://www.waikey.com/ if need cheap web hosting!