Skip to content

Instantly share code, notes, and snippets.

View amenophis1er's full-sized avatar

AmenOphis1er amenophis1er

View GitHub Profile
@amenophis1er
amenophis1er / PHPExcel_Basics.md
Created January 24, 2016 10:54 — forked from r-sal/PHPExcel_Basics.md
PHPExcel Notes and code snippets

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

@amenophis1er
amenophis1er / .htaccess
Created August 6, 2016 18:13 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
https://medium.com/@jon.mly/flutter-pour-un-dev-ios-blog-app-partie-1-b1987da68dd8
# Installation on Ubuntu
---
`sudo apt-get install php-codesniffer`
# Ruleset
---
The simpliest way to set your ruleset is to create your phpcs.xml file in your project root folder.
```xml
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PSR2" xsi:noNamespaceSchemaLocation="../../../phpcs.xsd">
#!/bin/bash
echo "------------------- END --------------------"
# Extract DB Credentials
echo "====> EXTRACT DB CREDENTIALS"
WPDBNAME=`cat wp-config.php | grep DB_NAME | cut -d \' -f 4`
WPDBUSER=`cat wp-config.php | grep DB_USER | cut -d \' -f 4`
WPDBPASS=`cat wp-config.php | grep DB_PASSWORD | cut -d \' -f 4`
# Dump MySQL Data

Assuming that in your docker-compose.yml, you have 2 services and named them php and db:

<?php
# Assuming you name your differents services like `php`, `db` for example, you can get the IP address with
echo \gethostbyname('php');
echo \gethostbyname('db');
"repositories": {
  ...
  "amenophis/myextension": {
      "type": "path",
      "url": "../myextension",
      "options": {
          "symlink": true
      }
 }

Multiple PHP Versions Installation Guide

This guide will help you install multiple versions of PHP on your macOS system using Homebrew. You can switch between these versions easily when needed. Additionally, we will set up aliases for convenient version switching.

Step 1: Install PHP Versions

To install multiple PHP versions, open your terminal and run the following commands:

brew install shivammathur/php/php@5.6