Skip to content

Instantly share code, notes, and snippets.

@optikalefx
optikalefx / MultipleEmailAttachments.php
Last active Oct 4, 2020
Multiple Email Attachments PHP from scratch
View MultipleEmailAttachments.php
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if(isset($_FILES) && (bool) $_FILES) {
$allowedExtensions = array("pdf","doc","docx","gif","jpeg","jpg","png","rtf","txt");
$files = array();
@thagxt
thagxt / mage2-multiweb-subdir.md
Last active Apr 19, 2022
Set up Magento 2 multiple websites in sub directories
View mage2-multiweb-subdir.md

Set up Magento 2 multiple websites in sub directories

  1. Go to Admin > Stores > All Stores
  2. Click > Create Web Site
  3. In the Name field, enter store name.
    • e.g. Japan
  4. In the Code field, enter a unique string without spaces and > Save Web Site
    • e.g. super_jp
  5. Create Store
  6. Create Store View
@amiantos
amiantos / index.js
Last active Nov 18, 2022
Zip Multiple Files from S3 using AWS Lambda Function
View index.js
// Lambda S3 Zipper
// http://amiantos.net/zip-multiple-files-on-aws-s3/
//
// Accepts a bundle of data in the format...
// {
// "bucket": "your-bucket",
// "destination_key": "zips/test.zip",
// "files": [
// {
// "uri": "...", (options: S3 file key or URL)