Skip to content

Instantly share code, notes, and snippets.

View robertbasic's full-sized avatar

Robert Basic robertbasic

View GitHub Profile
@robertbasic
robertbasic / succubus-kiss.md
Last active October 15, 2019 09:36
Succubus' kiss

Succubus' kiss is a dagger forged by Ammon Jerro, one of the most powerful warlocks in the history. He forged the dagger from the remains of the Silver Sword of Gith, which was broken in the battle against the King of Shadows. To give him an advantage in a future battle, Ammon quenched the dagger with the blood of his pit-fiend slave, succubus Blooden.

The blood of the succubus gives the wielder the power to drain a victim of their life force. Every strike at the victim deals a 2d12 psychic damage, or, if the victim got away, deals a 2d12 psychic damage per day until the victim dies. Only once the victim is dead, can the dagger "kiss" another person. The dagger itself deals 2d4 + 4 slashing damage.

While the victim is alive, the wielder of the dagger gets 1d4 temporary hit points per day, but it comes at a cost. When the dagger kisses someone, it also bites the wielder, leaving a bitemark between the thumb and the index finger. While the victim is alive, the bite mark stays fresh.

To heal a living victim

@robertbasic
robertbasic / abstract.md
Last active October 28, 2017 06:32
Code profiling with Xdebug and KCachegrind

Code profiling with Xdebug and KCachegrind

Everything we do is for users' satisfaction. An intuitive user interface, good design, useful features, absence of issues, are all focused on providing the best experience to the users of our applications. Speed of the application is one of the most important aspects of the user experience, but it is often neglected. It affects how users see the company behind the application and has direct impact on the conversion rate of web sites. It can make or break a business.

Profiling of web applications helps us to identify performance issues and give a detailed look on what is going on during a request.

Xdebug and KCachegrind are two tools that, when used to their fullest extent, can help identifying performance issues and

@robertbasic
robertbasic / abstract.md
Last active October 31, 2017 09:28
Easier mocking with Mockery

Easier mocking with Mockery

A slow suite of unit tests can prevent us from running it frequently. A complicated and complex dependency graph of our system under test can prevent us from writing tests in the first place.

One way to tackle these problems is to create test doubles with Mockery, a mock object framework, that will stand in for these dependencies and ensure a faster test suite.

This talk will give an overview of test doubles - fakes, stubs, mocks, and spies - and how to use Mockery to create them. We'll learn about handling method calls, matching arguments, mocking static instances and hard dependencies. All that regardless of the

@robertbasic
robertbasic / abstract.md
Last active October 26, 2017 11:52
introDDDuction

introDDDuction

Our clients come to us to solve their problems using software. We listen to their pitch, we read their emails, have a meeting or two, and then we take out our favourite code editor, framework and database, and start pounding at the keyboard. Few weeks, months later, we come back with a solution to all of their problems. Or is it, really?

Our solutions should be driven by our clients and what they really need. We need to listen to them, talk to them, understand them.

This presentation will show why we should become better communicators, and how we can use Domain Driven Design to bridge this communication gap. Creating an ubiquitous language that we share with our clients, we model their world in ours. These

@robertbasic
robertbasic / stuff.php
Created March 9, 2017 15:26
Zend Expressive, what's up mate?
<?php
// This is all going to be in one file here, but is split to different classes in real world
// Also intentionally left out bits and pieces not required for the sake of the example
$app = new Application($router, $container);
$app->pipe(MyMiddleware::class);
$app->pipeRoutingMiddleware();
@robertbasic
robertbasic / Dockerfile
Created January 21, 2017 17:46
Docker build for Qt 5.6.2 and Python 3.5.3 on CentOS 6.8
FROM centos:6.8
RUN yum -y install centos-release-scl && \
yum -y update && \
yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ devtoolset-3-binutils \
curl tar perl make openssl-devel \
libxcb libxcb-devel xcb-util xcb-util-devel \
libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel \
xcb-util-image xcb-util-image-devel \
xcb-util-keysyms xcb-util-keysyms-devel \
<?php
$senderMock = m::mock('Sender');
$senderMock->shouldReceive('doSend')
->once()
->ordered()
->with(1)
->andReturn(false);
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="panel-1" type="empty">
<property name="position" type="string" value="p=8;x=683;y=751"/>
<property name="length" type="uint" value="100"/>
<property name="position-locked" type="bool" value="true"/>
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.6 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up heirloom-mailx (12.5-2) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.6; however:
Package mysql-server-5.6 is not configured yet.
dpkg: error processing mysql-server (--configure):