Skip to content

Instantly share code, notes, and snippets.

View fradee's full-sized avatar

Oleksandr Fradynskyi fradee

  • Lviv, Ukraine
  • 15:21 (UTC +03:00)
  • LinkedIn in/fradee
View GitHub Profile
# Install percona MySQL server from Ansible Galaxy
- src: Xobb.percona
# Install PHP for RedHat/CentOS/Debian/Ubuntu from Ansible Galaxy
- src: geerlingguy.php
# Install PHP XDebug for Linux from Ansible Galaxy
- src: geerlingguy.php-xdebug
# Install Nginx for Linux/UNIX from Ansible Galaxy
- src: geerlingguy.nginx
# Install Memcached for Linux from Ansible Galaxy
- src: geerlingguy.memcached
@fradee
fradee / setup_mailcatcher.sh
Last active March 9, 2017 08:07 — forked from shark0der/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 16.04 (14.04 commands commented out)
#!/bin/bash
# Install dependencies
# older ubuntus
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
# xenial
apt install build-essential libsqlite3-dev ruby-dev
# Install the gem
# gem install mime-types -v 2.6.2 (gem install mime-types --version "< 3" gem install --conservative mailcatcher)
@fradee
fradee / convert.sh
Created August 25, 2017 16:44 — forked from akost/convert.sh
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# Place this file in the root of your site, add execute permission and run
# Converts *.php, *.html, *.css, *.js files.
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f |
while read file
do
- name: Set up multiple authorized keys
authorized_key:
user: deploy
state: present
key: '{{ item }}'
with_file:
- public_keys/doe-jane
- public_keys/doe-john
@fradee
fradee / magento - MINIMUM required apache modules for Magento
Last active October 24, 2017 10:02 — forked from zztimur/magento unnecessary apache modules
magento - apache modules that are not needed
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule mime_module modules/mod_mime.so
LoadModule dir_module modules/mod_dir.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
mod_expires – generates content expiration and cache control headers
mod_deflate - compresses content before it is delivered to the client
@fradee
fradee / magento unnecessary apache modules
Created October 24, 2017 09:52 — forked from zztimur/magento unnecessary apache modules
magento - apache modules that are not needed
Here is the list of apache modules which we were able to disable safely. This list is published just to give you idea, so be careful and consider your specific needs before disabling these.
Here is the list
proxy
proxy_ajp
proxy_balancer
proxy_connect
proxy_ftp
proxy_http
# Add correct content-type for fonts
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType font/x-woff .woff
AddType image/svg+xml .svg
# Compress compressible fonts
AddOutputFilterByType DEFLATE font/ttf font/otf image/svg+xml
@fradee
fradee / pagespeed.conf
Created November 15, 2017 18:58 — forked from molotovbliss/pagespeed.conf
mod_pagespeed.conf for Magento 1.x
<IfModule mod_pagespeed>
# General Configuration
ModPagespeed on
ModPagespeedDomain *.domain.com
ModPagespeedDomain images.domain.com
ModPagespeedDomain assets.domain.com
ModPagespeedStatistics on
ModPagespeedStatisticsLogging on
ModPagespeedLogDir /home/domain.com/public_html/var/pagespeed

With a bit of playing around I've managed to come up with a semi solution (not perfect but good enough)

using 2707974 answer and information I've gained else where I've been able to get what I need.

First you need vsftp and PAM installed

apt-get install vsftpd libpam-pwdfile apache2-utils

Edit /etc/vsftpd.conf

@fradee
fradee / PostfixMandrill.md
Created November 29, 2017 12:48 — forked from soifou/PostfixMandrill.md
Install Mandrill with Postfix

Postfix / Mandrill

Installation

# apt-get install postfix

Configuration sasl

# vim /etc/postfix/sasl_passwd