Skip to content

Instantly share code, notes, and snippets.

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

Manuel Glez manuglopez

🏠
Working from home
View GitHub Profile
@manuglopez
manuglopez / AppServiceProvider.php
Created January 24, 2024 19:43 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@manuglopez
manuglopez / default HTTP
Created May 21, 2023 23:48 — forked from iam-hussain/default HTTP
Serve nextJS app from a port through NGINX reverse proxy HTTP and HTTPS
# Serve nextJS app from a port through NGINX reverse proxy (HTTP)
# Path: /etc/nginx/sites-available/default
# Default server configuration for HTTP
server {
server_name www.DOMAINNAME.com DOMAINNAME.com;
# Serve any static assets with NGINX
location /_next/static {
alias /home/ubuntu/PROJECT_FOLDER/.next/static;
@manuglopez
manuglopez / LoadData.php
Created January 7, 2021 00:46 — forked from Artistan/LoadData.php
Load Data Local Infile - Laravel Seeder
<?php
/**
* notes
*
* decent tutorial on load data...
* https://tenerant.com/blog/using-load-data-local-infile-in-a-laravel-migration/
*
* simple example
* https://gist.github.com/Xeoncross/2012182
*
@manuglopez
manuglopez / DD from payload.json
Created January 6, 2021 12:17
Payload from DebugBar Custom Storage
{
"id": "X87f30986549813dd958614b466c2e859",
"base_path": "\/home\/mglopez\/Code\/avapp",
"app": "Laravel",
"data": {
"__meta": {
"id": "X87f30986549813dd958614b466c2e859",
"datetime": "2021-01-06 12: 11: 15",
"utime": 1609935075.571848,
"method": "GET",
return Event::with(['city.companies.persons' => function ($query) {
$query->select('id', '...');
}])->get();
@manuglopez
manuglopez / ThemosisValetDriver.php
Created September 8, 2020 05:14
Themosis Valet Driver
<?php
class ThemosisValetDriver extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@manuglopez
manuglopez / EmailExampleTest.php
Created March 4, 2018 12:27 — forked from GesJeremie/EmailExampleTest.php
Email test case for testing emails with Mailtrap.io in Phpunit
<?php
/*
|--------------------------------------------------------------------------
| EmailExampleTest
|--------------------------------------------------------------------------
|
| Email test case for testing emails with Mailtrap.io in Phpunit
|
| Requirements:
| - Laravel 5.1
@manuglopez
manuglopez / vuetemplate.txt
Last active February 7, 2018 06:35
Vue template for Live Template in PhpStorm
<template>
$template$
</template>
<script>
export default {
props: [$Prop$],
data() {
return {
$return$
}
@manuglopez
manuglopez / README.md
Created March 12, 2017 18:37 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@manuglopez
manuglopez / .gitignore
Created February 20, 2017 18:26 — forked from salcode/.gitignore
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20160309
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.