Skip to content

Instantly share code, notes, and snippets.

View sarahcssiqueira's full-sized avatar

Sarah Siqueira sarahcssiqueira

View GitHub Profile
@sarahcssiqueira
sarahcssiqueira / .phpcs.xml
Created August 3, 2023 23:18
Workaround to handle PSR-4 && WordPress Coding Standards at same time
<?xml version="1.0"?>
<ruleset name="CS">
<description>PHPCS example</description>
<config name="testVersion" value="5.6-"/>
<exclude-pattern>vendor/*</exclude-pattern>
<arg value="ps"/>
<arg name="colors"/>
<arg name="parallel" value="100"/>
<arg name="extensions" value="php"/>
@sarahcssiqueira
sarahcssiqueira / webpack dependencies
Last active April 19, 2024 18:15
webpack.config.js for WordPress projects
{
"devDependencies": {
"@babel/cli": "^7.22.9",
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@babel/preset-react": "^7.22.5",
"babel-loader": "^9.1.2",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
@sarahcssiqueira
sarahcssiqueira / le-ssl.conf
Created July 12, 2023 22:40
Fix error "Could not reverse map the HTTPS VirtualHost to the original"
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName domain-name.com
ServerAlias www.domain-name.com
DocumentRoot /var/www/domain-name
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
@sarahcssiqueira
sarahcssiqueira / Composer Dependencies and script to config path
Last active July 4, 2023 13:41
PHPCS config using Composer, VS Code
"scripts": {
"cstd": "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.7",
"wp-coding-standards/wpcs": "^2.3",
}