Skip to content

Instantly share code, notes, and snippets.

View eniuz's full-sized avatar

Mariusz Szot eniuz

View GitHub Profile
@eniuz
eniuz / ddd_cqrs_event-sourcing_in_php.md
Created August 21, 2018 13:25 — forked from jsor/ddd_cqrs_event-sourcing_in_php.md
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@eniuz
eniuz / xvfb
Created October 24, 2017 10:22 — forked from jterrace/xvfb
xvfb init script for Ubuntu
XVFB=/usr/bin/Xvfb
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset"
PIDFILE=/var/run/xvfb.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)
@eniuz
eniuz / send-receive-sqs.php
Created June 7, 2017 13:30 — forked from fbrnc/send-receive-sqs.php
Sending and receiving messages from/to AWS SQS via PHP
<?php
// curl -sS https://getcomposer.org/installer | php
// php composer.phar require aws/aws-sdk-php
// export AWS_ACCESS_KEY_ID=...
// export AWS_SECRET_ACCESS_KEY=...
$queueUrl = '<INSERT_URL_OF_EXISTING_QUEUE_HERE>';
@eniuz
eniuz / git-log-to-tsv.sh
Created June 1, 2017 21:02 — forked from pwenzel/git-log-to-tsv.sh
Git Log to Tab-Delimited CSV File
# Local Dates:
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt
# ISO Dates:
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt
@eniuz
eniuz / webpack.config.js
Created September 13, 2016 07:41 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@eniuz
eniuz / gist:b378ff6cc1c834e9b8de673d06539b96
Last active June 23, 2016 13:00
Block Types used in magento
core/template: This block renders a template defined by its template attribute. The majority of blocks defined in the layout are of type or subtype of core/template.
page/html: This is a subtype of core/template and defines the root block. All other blocks are child blocks of this block.
page/html_head: Defines the HTML head section of the page which contains elements for including JavaScript, CSS etc.
page/html_header: Defines the header part of the page which contains the site logo, top links, etc.
page/template_links: This block is used to create a list of links. Links visible in the footer and header area use this block type.
@eniuz
eniuz / 10-lines-from-the-top.txt
Created June 17, 2016 09:43
get 10/20 lines from the top of the file
head command example to print first 10/20 lines
head -10 bar.txt
head -20 bar.txt
sed command example to print first 10/20 lines
sed -n 1,10p /etc/group
sed -n 1,20p /etc/group
awk command example to print first 10/20 lines
awk 'FNR <= 10' /etc/passwd
@eniuz
eniuz / list-cron-jobs-for-all-users.sh
Created June 8, 2016 09:16
List cron jobs for all users
#!/bin/sh
for user in $(cut -f1 -d: /etc/passwd); do sudo crontab -u $user -l; done
@eniuz
eniuz / install-php5u-on-centos6.sh
Created May 26, 2016 10:18
Install php5u on Centos 6
wget https://centos6.iuscommunity.org/ius-release.rpm; rpm -Uvh ius-release.rpm \
rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-13.ius.el6.noarch.rpm \
yum install t1lib libtool-ltdl libc-client automake autoconf file libtidy \
yum --disablerepo=* --enablerepo=ius-archive install php53u-mcrypt.x86_64 php53u-xml.x86_64 php53u-soap.x86_64 php53u-mbstring.x86_64 php53u-gd.x86_64 php53u-imap.x86_64 php53u-bcmath.x86_64 php53u.x86_64 php53u-xcache.x86_64 php53u-ioncube-loader.x86_64 php53u-devel.x86_64 php53u-cli.x86_64 php53u-mysql.x86_64 php53u-tidy.x86_64 php53u-common.x86_64
@eniuz
eniuz / gist:04f92f3d3597ecbc762f
Created March 29, 2016 15:01
Invalid backend model specified: catalog/product_attribute_backend_startdate_specialprice
UPDATE `eav_attribute` SET `backend_model` = 'eav/entity_attribute_backend_datetime' WHERE `backend_model` = 'catalog/product_attribute_backend_startdate_specialprice’;