Skip to content

Instantly share code, notes, and snippets.

View juanlopezdev's full-sized avatar

Juan López juanlopezdev

View GitHub Profile
@juanlopezdev
juanlopezdev / LARAVEL_useful_commands.md
Last active December 6, 2023 00:45
Comandos útiles de Laravel

Crear un controlador tipo recurso

$ php artisan make:controller PhotoController --resource

Crear un Form Request

Su nomenclatura es (Nombre-del-modelo-que-impacta)+(Acción)+Request. Por ejemplo, si quieres crear un Form Request para validar los datos que actualizarán el modelo Post, deberías ponerle el siguiente nombre:

@juanlopezdev
juanlopezdev / HOMESTEAD_install.md
Last active January 25, 2018 04:01
[Instalar Homestead] Instalacion de entorno virtual Homestead #tutoriales #laravel

Homestead

Prerequisito

Generar llaves SSH, si no las tenemos podemos generarlas con el siguiente comando:

ssh-keygen -t rsa -b 4096 -C "[email protected]"
@juanlopezdev
juanlopezdev / LARAVEL_lumen.md
Last active November 21, 2023 18:23
Apuntes y primeros pasos con LUMEN (Microframework de Laravel)

Lumen

Lumen es un micro-framework para PHP.

Lumen es una versión más liviana de Laravel y orientado más a la creación de APIs y microservicios, aunque también puedes usarlo para crear sitios web o lo que quieras.

Si es posible migrar de Lumen a Laravel

Microservicios:

@joseluisq
joseluisq / angular-fbxnd.js
Last active November 22, 2016 03:00
Facebook JSDK Factory for Angular 1.x
(function (angular) {
angular
.module('fbxnd', [])
.factory('FBXnd', function ($q) {
/**
* window.FB extended class
* José Luis Quintana <https://git.io/joseluisq | MIT License
* Reference: https://developers.facebook.com/docs/javascript/reference/FB.api
@joseluisq
joseluisq / menu-toggle.html
Last active May 5, 2021 12:11
SASS Menu Toggle for Mobile Screen
<a href="#" id="menu-toggle">
<span></span>
</a>
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter