Skip to content

Instantly share code, notes, and snippets.

View marinsagovac's full-sized avatar

Marin Sagovac marinsagovac

View GitHub Profile
@marinsagovac
marinsagovac / Redis Ubuntu PHP
Created January 18, 2018 10:19
Redis Ubuntu PHP
# Install Redis
sudo apt-get install redis-server
sudo apt-get install php-redis
sudo nano /etc/redis/redis.conf
Edit:
maxmemory 128mb
@marinsagovac
marinsagovac / Mailhog + Symfony 3
Last active March 29, 2021 19:37
Mailhog + Symfony 3
$message = \Swift_Message::newInstance()
->setSubject('Hello Email')
->setFrom('[email protected]')
->setTo('[email protected]')
->setBody('You should see me from the profiler!')
;
$this->get('mailer')->send($message);
@marinsagovac
marinsagovac / Apache Kafka
Last active July 14, 2021 02:28
Apache Kafka
=== Java install ===
java zookeeper-3.4.10.jar
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt install oracle-java8-set-default
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
sudo update-alternatives --config java
sudo update-alternatives --config javac
@marinsagovac
marinsagovac / Docker
Last active January 2, 2018 15:18
Docker
=== Install ===
=== Prepare Docker ===
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
41 stable"
sudo apt-get install docker-ce
@marinsagovac
marinsagovac / Elasticsearch tutorials
Last active April 25, 2018 09:21
Elasticsearch tutorials
=== ElasticSearch ===
Install DEB package from: https://www.elastic.co/downloads/elasticsearch
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.1.deb
dpkg -i https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.1.deb
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
java -version
@marinsagovac
marinsagovac / Gearman PHP 7
Last active January 1, 2018 19:02
Gearman PHP 7
=== Install Gearman ===
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get -y install php7.0 php7.0-fpm php-gearman
sudo touch /var/log/gearmand.log
sudo chmod 0666 /var/log/gearmand.log
gearmand -d
@marinsagovac
marinsagovac / Logrotate unix
Created December 15, 2017 10:50
Logrotate unix
LOGROTATE CENTOS
================
INFO
====
Check is logrotate active:
cat /etc/cron.daily/logrotate
@marinsagovac
marinsagovac / Ubuntu MongoDB install
Created December 15, 2017 10:49
Ubuntu MongoDB install
### Ubuntu Mongodb ###
### Installing Mongodb ###
sudo apt-get install mongodb-server
sudo service mongodb start
Check log in "/var/log/mongodb/mongodb.log"
@marinsagovac
marinsagovac / PHP Xrange
Created December 15, 2017 09:54
PHP Xrange
<?php
function xrange($start, $limit, $step = 1) {
if ($start < $limit) {
if ($step <= 0) {
throw new LogicException('Step must be +ve');
}
for ($i = $start; $i <= $limit; $i += $step) {
yield $i;
=======================
ONLINE RESOURCES:
=======================
SECTION 1 - OVERVIEW - COURSE INTRODUCTION
========================================
- understand the Magento architecture and modules
- efficiently and effectively customize and extend Magento
- enable the best upgrade path to new versions