Skip to content

Instantly share code, notes, and snippets.

View dragoljub-bogicevic-devtech's full-sized avatar

Dragoljub Bogicevic dragoljub-bogicevic-devtech

View GitHub Profile
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / .gitconfig
Last active October 8, 2017 12:09
My version of .gitconfig
[user]
name = dragoljub-bogicevic-devtech
email = dragoljub.bogicevic@devtechgroup.com
[credential]
helper = wincred
[core]
ignorecase = false
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[color]
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / Vagrantfile
Last active June 26, 2017 10:54
Nginx as a reverse proxy for two nginx web servers with php-fpm enabled
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / provision-php-fpm-web-server.sh
Last active June 26, 2017 10:53
Set up nginx as web server with php-fpm enabled
#!/bin/bash
echo "Starting Provision: web server $1"
sudo apt-get update
sudo apt-get install -y nginx
sudo service nginx stop
sudo apt-get install -y php5-fpm
sudo rm -rf /etc/php5/fpm/php.ini
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / php.ini
Created June 22, 2017 12:46
/etc/php5/frm/php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / provision-reverse-proxy.sh
Last active June 26, 2017 08:37
Set up nginx as reverse proxy for two php-fpm web-servers
#!/bin/bash
echo 'Starting Provision: reverse proxy'
sudo apt-get update
sudo apt-get install -y nginx
sudo service nginx stop
sudo mkdir -p /var/www/html
sudo touch /var/www/html/index.html
echo '<html><body><a href="http://proxy.dev/app1">APP1</a><br><br>
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / Vagrantfile
Last active June 21, 2017 18:40
Load balancer with two web server for static web content
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / provision-web-server.sh
Last active June 21, 2017 18:36
Set up nginx as web server for static content
#!/bin/bash
echo "Starting Provision: web server $1"
sudo apt-get update
sudo apt-get install -y nginx
sudo service nginx stop
sudo mkdir -p /var/www/html
sudo touch /var/www/html/index.html
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / provision-loadbalancer.sh
Last active June 21, 2017 18:39
Set up for nginx loadbalancer
#!/bin/bash
echo 'Starting Provision: loadbalancer'
sudo apt-get update
sudo apt-get install -y nginx
sudo service nginx stop
sudo rm -rf /etc/nginx/sites-available/default
sudo rm -rf /etc/nginx/sites-enabled/default
sudo touch /etc/nginx/sites-enabled/default
echo "upstream backend {
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / .php_cs.dist
Last active October 18, 2017 06:49
.php_cs.dist file example
<?php
return PhpCsFixer\Config::create()
->setRules([
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
'blank_line_after_namespace' => true,
'braces' => true,
'class_definition' => true,
'elseif' => true,
'encoding' => true,
@dragoljub-bogicevic-devtech
dragoljub-bogicevic-devtech / circle.yml
Created May 10, 2017 12:36
circle.yml file example
deployment:
dockerhub:
branch: master
commands:
- $DOCKER_HUB_TRIGGER
machine:
php:
version: "7.0.11"