Skip to content

Instantly share code, notes, and snippets.

View tuto1902's full-sized avatar

Arturo Rojas tuto1902

View GitHub Profile
@tuto1902
tuto1902 / app.blade.php
Created August 25, 2022 22:36
App Layout File
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ config('app.name') }}</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
@tuto1902
tuto1902 / launch.json
Last active April 8, 2025 10:33
VSCode Debugger Launch Configuration
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"log": false,
"externalConsole": false,
"pathMappings": {
@tuto1902
tuto1902 / ext-xdebug.ini
Created April 24, 2021 19:46
XDebug configuration file
[xdebug]
xdebug.start_with_request=yes
xdebug.discover_client_host=true
xdebug.max_nesting_level=256
xdebug.remote_handler=dbgp
xdebug.client_port=9000
xdebug.idekey=VSCODE
xdebug.mode=debug
xdebug.client_host=host.docker.internal

SSL for Local Development

Generate key file

openssl genrsa -des3 -out rootCA.key 2048

Generate certificate

openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem

@tuto1902
tuto1902 / users.sql
Last active November 2, 2019 01:50
Simple users database
CREATE TABLE homestead.users (
id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
email varchar(255) NOT NULL,
password varchar(255) NOT NULL,
created_at timestamp NULL DEFAULT NULL,
updated_at timestamp NULL DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY users_email_unique (email)
@tuto1902
tuto1902 / resumes.sql
Last active September 20, 2019 03:53
Resumes Database Schema
CREATE DATABASE resumes;
CREATE TABLE resumes.users (
id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
email varchar(255) NOT NULL,
phone varchar(10) NOT NULL,
password varchar(255) NOT NULL,
remember_token varchar(100) NULL DEFAULT NULL,
@tuto1902
tuto1902 / TestCase.php
Created July 25, 2017 04:09
Laravel TestCase base class with exception handling helper methods
<?php
namespace Tests;
use Exception;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use App\Exceptions\Handler;
use Illuminate\Contracts\Debug\ExceptionHandler;
abstract class TestCase extends BaseTestCase
@tuto1902
tuto1902 / publish_subscribe
Created January 27, 2014 17:08
Publish / Subscribe
Application.vent.on('someEvent', function(someData){
console.log('Event triggered with ' + someData);
});
Application.vent.trigger('someEvent', 'some data');