Skip to content

Instantly share code, notes, and snippets.

View fulopattila122's full-sized avatar

Attila Fulop fulopattila122

View GitHub Profile
@fulopattila122
fulopattila122 / OrderPaid.php
Created October 8, 2021 10:24
SendOrderPaidNotification
<?php
namespace App\Modules\Membership\Notifications;
use App\Modules\Order\Models\Order;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class OrderPaid extends Notification
{
@fulopattila122
fulopattila122 / monolithic-vs-modular.md
Created April 6, 2017 06:39 — forked from joepie91/monolithic-vs-modular.md
Monolithic vs. modular - what's the difference?

When you're developing in Node.js, you're likely to run into these terms - "monolithic" and "modular". They're usually used to describe the different types of frameworks and libraries; not just HTTP frameworks, but modules in general.

At a glance

  • Monolithic: "Batteries-included" and typically tightly coupled, it tries to include all the stuff that's needed for common usecases. An example of a monolithic web framework would be Sails.js.
  • Modular: "Minimal" and loosely coupled. Only includes the bare minimum of functionality and structure, and the rest is a plugin. Fundamentally, it generally only has a single 'responsibility'. An example of a modular web framework would be Express.

Coupled?

In software development, the terms "tightly coupled" and "loosely coupled" are used to indicate how much components rely on each other; or more specifically, how many assumptions they make about each other. This directly translates to how easy it is to repla

@fulopattila122
fulopattila122 / ccsym_dev.sh
Last active December 11, 2016 15:12
Properly clean Symfony/Sylius cache on development environment
#!/bin/bash
[ ! -d app/cache/dev ] && echo "No [app/cache/dev] folder waz found here" && exit 1
sudo echo "Symfony Cache Cleaner" || exit 1
echo -n "Clearing folder [app/cache/dev] (except for sessions)..."
ls app/cache/dev/ | grep -v sessions | grep -v feed | tr '\n' '\0' | xargs -0 -L1 -I '$' sudo rm -rf 'app/cache/dev/$'
echo OK
@fulopattila122
fulopattila122 / ccsym_prod.sh
Last active February 25, 2016 08:34
Symfony Cache Cleaner (keeps sessions, also clears redis, resets permissons)
#!/bin/bash
[ ! -d app/cache/prod ] && echo "No [app/cache/prod] folder waz found here" && exit 1
sudo echo "Symfony Cache Cleaner" || exit 1
echo -n "Clearing folder [app/cache/prod] (except for sessions)..."
ls app/cache/prod/ | grep -v sessions | grep -v feed | tr '\n' '\0' | xargs -0 -L1 -I '$' sudo rm -rf 'app/cache/prod/$'
echo OK