Skip to content

Instantly share code, notes, and snippets.

View 4selin's full-sized avatar
🎯
Focusing

Alex 4selin

🎯
Focusing
View GitHub Profile
@4selin
4selin / pre-commit
Created October 3, 2020 11:27 — forked from fdemiramon/pre-commit
Pre-commit hook for git with phpcs and phpcbf (auto-correct obvious violations)
#!/bin/sh
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
if [ "$#" -eq 1 ]
then
oIFS=$IFS
IFS='
@4selin
4selin / pagespeed-module.md
Created January 7, 2020 13:56 — forked from harryfinn/pagespeed-module.md
Pagespeed module (Apache) instructions

Using Google Pagespeed module (Apache)

Install

Follow initial install instructions here

Recommended additional modules

Add the following to the bottom (but inside the <IfModule /> block) of /etc/apache2/mods-available/pagespeed.conf

@4selin
4selin / apache-vhost-vagrant.md
Created July 21, 2018 08:38 — forked from smotesko/apache-vhost-vagrant.md
Apache vhost reverse proxy for using Vagrant env on a localhost:80 (Mac)
  • Configure Vagrant box to forward guest port 80 to host port 8001
  • Add vhost to your Apache:
<VirtualHost *:80>
  ServerName projectname.local
  ProxyPass / http://localhost:8001/
  ProxyPassReverse / http://localhost:8001/
  ProxyPreserveHost On
</VirtualHost>