Skip to content

Instantly share code, notes, and snippets.

View Gerardlc's full-sized avatar

Gerard Gerardlc

  • ecomm360
  • Barcelona
View GitHub Profile
@Gerardlc
Gerardlc / ThemeSwitcher.vue
Created February 25, 2024 17:44 — forked from askasim/ThemeSwitcher.vue
Laravel Jetstream Dark Mode Switch
<template>
<div class="flex justify-center">
<div class="relative">
<button
class="flex text-md border-2 border-transparent rounded-full focus:outline-none focus:border-gray-300 transition"
@click="toggleDropdown"
>
<SunIcon
v-if="option === 'light'"
class="h-6 w-6"
@Gerardlc
Gerardlc / .gitignore
Created January 21, 2022 12:25 — forked from prestarocket/.gitignore
Gitignore PrestaShop 1.7
# Cache, temp and personal files
/.htaccess
*.log
npm-debug.log.*
.sass-cache/
/cache/*
download/*
/img/*
/log/*
@Gerardlc
Gerardlc / Activate Office 2019 for macOS VoL.md
Created January 31, 2020 10:07 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@Gerardlc
Gerardlc / gist:f6bf1e46b6a25a5471b27b9579e38135
Created November 13, 2019 08:32 — forked from alexsegura/gist:9650651
Prestashop 1.6 folder permissions
chmod a+w -R config/
chmod a+w -R cache/
chmod a+w -R log/
chmod a+w -R img/
chmod a+w -R mails/
chmod a+w -R modules/
chmod a+w -R themes/default-bootstrap/lang/
chmod a+w -R themes/default-bootstrap/pdf/lang/
chmod a+w -R themes/default-bootstrap/cache/
chmod a+w -R translations/
@Gerardlc
Gerardlc / lamp-stack-osx-virtualhostx.md
Created September 24, 2019 16:26 — forked from pwenzel/lamp-stack-osx-virtualhostx.md
LAMP stack on OSX with Homebrew, built-in Apache, multiple PHP versions, VirtualhostX optional

This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.

VirtualHostX is a convenient way to manage development sites, but not required.

Install PHP and MySQL with Homebrew

brew update
brew install php56
brew install php56-mcrypt
brew install mysql
@Gerardlc
Gerardlc / combos.php
Created June 21, 2019 10:46 — forked from fabiocicerchia/combos.php
PHP - Generate all the possible combinations among a set of nested arrays.
/**
* Generate all the possible combinations among a set of nested arrays.
*
* @param array $data The entrypoint array container.
* @param array $all The final container (used internally).
* @param array $group The sub container (used internally).
* @param mixed $val The value to append (used internally).
* @param int $i The key index (used internally).
*/
function generate_combinations(array $data, array &$all = array(), array $group = array(), $value = null, $i = 0)
@Gerardlc
Gerardlc / Readme.md
Created March 1, 2019 13:34 — forked from GrzegorzBandur/Readme.md
RESTful API with Symfony 4 + FOSRestBundle + FOSOauthServerBundle + FOSUserBundle

RESTful API with Symfony 4 + FOSRestBundle + FOSOauthServerBundle + FOSUserBundle

To start writing RestFull API in symfony we will need bundles:

"friendsofsymfony/oauth-server-bundle": "1.6",
"friendsofsymfony/rest-bundle": "^2.3",
"friendsofsymfony/user-bundle": "^2.1",
"jms/serializer-bundle": "^2.4",
"nelmio/api-doc-bundle": "^2.13",
"sensio/framework-extra-bundle": "^5.2",
"symfony/apache-pack": "^1.0",
@Gerardlc
Gerardlc / product-lifecycle-hooks.txt
Created November 27, 2018 10:03 — forked from cdoublev/product-lifecycle-hooks.txt
PS product lifecycle hooks.
--------------------------------------------------------------------------------
Duplicate product ($this->action = 'duplicate')
--------------------------------------------------------------------------------
AdminController::postProcess > actionAdminProductsControllerDuplicateBefore
AdminProductsController::processDuplicate
Product::add
ObjectModel::add > actionObjectProductAddBefore
--- ! saved ! ---
ObjectModel::add > actionObjectProductAddAfter
Product::add > actionProductSave
@Gerardlc
Gerardlc / Laravel requires the Mcrypt PHP extension
Created August 12, 2018 09:07 — forked from alexlondon07/Laravel requires the Mcrypt PHP extension
Change default Mac OS X PHP to MAMP's PHP Installation
Change default Mac OS X PHP to MAMP's PHP Installation
Instructions to Change PHP Installation
First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
@Gerardlc
Gerardlc / Instalacion MongoDB Windows.md
Created February 11, 2018 11:05 — forked from AlejoJamC/Instalacion MongoDB Windows.md
Pasos para instalar MongoDB en Windows

Instalación de MongoDB en MS Windows

  1. Obtener el instalador para Windows del centro de descargas.
  2. Iniciar el instalador como administrador.
  3. Crear las carpeta de almacenamiento y configuracion de MongoDB.
  • Dar permisos escritura y lectura a estas carpetas.
 C:\data 
 C:\data\db