This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# print usage | |
DOMAIN=$1 | |
if [ -z "$1" ]; then | |
echo "USAGE: $0 tld" | |
echo "" | |
echo "This will generate a non-secure self-signed wildcard certificate " | |
echo "for a given top-level domain (TLD) and thus should only be used " | |
echo "for your local development environment." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dockerfile | |
# Defines an image. | |
# Rebuild this image: docker build -t [image name]:latest . | |
FROM php:8.2-apache | |
# Install packages. | |
RUN apt-get update && apt-get install -y \ | |
vim \ | |
unzip \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer create-project [package][:version] . --no-interaction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
db: | |
build: | |
context: . | |
network: prestashop-net | |
container_name: db | |
image: mysql:5.7 | |
ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function install() | |
{ | |
if ($this->registerHook('actionAdminControllerSetMedia')) { | |
return true; | |
} | |
$this->uninstall(); | |
return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add all these functions to your custom module | |
/** | |
* Function to display content for your module in the Back Office | |
* | |
* @return string | |
*/ | |
public function getContent() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function install() | |
{ | |
if ($this->registerHook('actionCustomerGridDefinitionModifier') && | |
$this->registerHook('actionCustomerGridQueryBuilderModifier')) { | |
return true; | |
} | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generic logging function | |
* | |
* @param $event | |
* @param $info | |
* @param int $level | |
* @param null $supplementary | |
* @return bool | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function install() | |
{ | |
// Hook registration needs to go in the install function of your module | |
if ($this->registerHook('displayHeader')) { | |
return true; | |
} | |
return false; | |
} |
NewerOlder