Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Alexey 4selin

🎯
Focusing
View GitHub Profile
@4selin
4selin / pre-commit
Created Oct 3, 2020 — forked from fdemiramon/pre-commit
Pre-commit hook for git with phpcs and phpcbf (auto-correct obvious violations)
View pre-commit
#!/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 Jan 7, 2020 — forked from harryfinn/pagespeed-module.md
Pagespeed module (Apache) instructions
View pagespeed-module.md

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

View db_copy.sh
#!/bin/bash -v
#Remote
remote_user=
remote_ip=
remote_db=
remote_db_user=
remote_db_password=
#Local
@4selin
4selin / apache-vhost-vagrant.md
Created Jul 21, 2018 — forked from smotesko/apache-vhost-vagrant.md
Apache vhost reverse proxy for using Vagrant env on a localhost:80 (Mac)
View apache-vhost-vagrant.md
  • 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>
View gist:01ed34dc6b42835b64e115192c26fa0f
#PhpStorm
/.idea
#Vendor (e.g. Composer)
/vendor/
#Wordpress Core Files
index.php
license.txt
readme.html
@4selin
4selin / deploy.sh
Last active Jul 1, 2018
deploy bash script
View deploy.sh
#!/bin/bash -x
# -v verbose Print each command to stdout before executing it
# -x xtrace Similar to -v, but expands commands
#Remote User
user=_enter_user_
#Remote Group
group=www-data