Skip to content

Instantly share code, notes, and snippets.

View veggigit's full-sized avatar
🏠
Working from home

Esteban Cajina veggigit

🏠
Working from home
  • Santiago de Chile
View GitHub Profile
@mohammad425
mohammad425 / getAllModels.php
Created August 25, 2020 18:07
Get a list of all models in Laravel
<?php
use Illuminate\Support\Facades\File;
function getAllModels(): array
{
$composer = json_decode(file_get_contents(base_path('composer.json')), true);
$models = [];
foreach ((array)data_get($composer, 'autoload.psr-4') as $namespace => $path) {
$models = array_merge(collect(File::allFiles(base_path($path)))
@jmarreros
jmarreros / add-user-admin-WordPress.sql
Last active November 30, 2020 23:46
Agrega un usuario administrador a WordPress por Base de Datos
-- Cambiar valores
START TRANSACTION;
SET @prefix = 'wp_';
SET @user_login = 'demo';
SET @user_pass = 'demo';
SET @user_email = 'demo@demo.com';
SET @display_name = 'Nombre Demo';
-- Actualiza tabla de usuarios
@danielalvarenga
danielalvarenga / script-configure-ubuntu18.94-amd64.sh
Created July 17, 2019 23:57
Shell script to configure Ubuntu 18.04.
#!/bin/bash
# Author: Daniel Alvarenga Lima
# Ubuntu version supported: 18.04 LTS 64Bit
# EXECUTE
# sudo chmod +x script-configure-ubuntu18.94-amd64.sh
# ./script-configure-ubuntu18.94-amd64.sh
#INSTRUCTIONS
@ww9
ww9 / gist_markdown_examples.md
Last active June 25, 2024 19:25
Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@gdespirito
gdespirito / ChileanTableSeeder.php
Created September 17, 2018 03:16
Table Seeder para cargar regiones y comunas de chile en Laravel (2018). Incluyendo nueva Región de Ñuble.
<?php
use Illuminate\Database\Seeder;
class ChileTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
@m2sh
m2sh / DOSpacesStorageServiceProvider.php
Last active January 17, 2024 05:03
How To Use Digitalocean Spaces as Laravel Cloud filesystems
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;
@joseluisq
joseluisq / 1README.md
Created April 19, 2017 07:33
How add a custom field to Laravel 5.4 default login. LoginController.php

How add a custom field to Laravel 5.4 default login controller.

In this php example (app/Http/Controllers/Auth/LoginController.php) my model is called Client and the custom field for login validation is status. (Client->status)

Add in your resources/lang/en/auth.php file :

    'failed_status' => 'Your account is inactive yet. Please confirm your e-mail address.',
@folbert
folbert / bedrock-setup-guide.md
Last active October 16, 2023 11:08
How to get up and running with Bedrock and Bedrock Capistrano at Oderland

Getting up and running with Bedrock

If you get totally stuck, here are some resources that may help you: Roots Discourse. Actually, you may want to head over and read this through really quick. It's nowhere near as long as this and may be good to have in the back of your mind when reading the rest of this document. Capistrano Website with manual Screencast on deploying WordPress with Capistrano.

Bedrock?

Bedrock is created by the good awesome people behind Sage and is described as a "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure." Read more at https://roots.io/bedrock.

@juanbrujo
juanbrujo / comunas-regiones.json
Last active June 3, 2024 16:31 — forked from sergiohidalgo/comunas-regiones-chile.json
Comunas y regiones de chile JSON
{
"regiones": [
{
"region": "Arica y Parinacota",
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"]
},
{
"region": "Tarapacá",
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"]
},