php

I got super annoyed having to set up all the dependencies for each project every time I started one, and especially implementing user management... Log in, register, confirm email, forgot password, MFA, change email, impersonate, manage avatars, over and over again, booooooring!

So here it is: a template for quickstarting new projects, with all of the above (and more!) included out of the box!

gitlab.com/Avris/Booster

Twemoji is a great way to make emoji's on your website independent of system and browser. But alas, it requires JavaScript...

Unless you just use this library to replace emojis with <img> tags in your backend.

avris/twemoji gitlab.com/Avris/Twemoji

FontAwesome provides thousands of icons, but you probably only use a few dozen on your website. Instead of loading all of them as a webfont, you could use SVG sprites.

This library is a simple helper that:

  • registers the icons you use in the place you use it,
  • dumps a refined set of SVG symbols at the end of your page.

You can check out a blog post about possible gains.

avris/fontawesome-optimiser gitlab.com/Avris/FontAwesomeOptimiser
Screenshot of the new version of the blog

It wasn’t really supposed for the New Year, but I’ve had plenty of free time on my hands during the holiday break, so here it is already: a brand new version of my blog 🥳

Continue reading…
(~3 min read)

I got tired of creating deployment scripts for my project, so I finally put together a simple, language-agnostic deployment script based on Makefile and symlinks.

gitlab.com/Avris/Deployer

For quite a while my VPS was misconfigured – any HTTP requests it got but couldn’t assign to a vhost, it redirected to the main website, avris.it. I didn’t think it would be a big deal, until I recently found out that my post Ungoogling is indexed by Google under https://askara.avris.it/blog/ungoogling

This subdomain hadn’t existed for a long time already, my server doesn’t serve a certificate for it anymore, but it requires HSTS, so browsers end up showing users a scary error message.

I had to do something about it.

Continue reading…
(~3 min read)

Easily share content...

Need to send someone a nicely formatted text accessible via a simple link? Look no further. Simply add text, headers, images, tables, videos, quotes, code, etc. – and publish it with one click.

Anonymously...

No need to run a blog or have a social media account – using showr you can put content on the Internet without registering, and just post the link wherever and however you want.

With a self-destruct...

Sometimes you want things to be more volatile. Showr lets you set a time limit and limit of unique visitors – after either of them is reached, your content will just self-destruct.

showr.link
Avris GraphqlBundle

Simplify Graphql configuration using plain methods with typehints and annotations.

This bundle is a wrapper on webonyx/graphql-php.

Continue reading…
(~3 min read)
gitlab.com/Avris/GraphqlBundle

The PHP ecosystem is full of frameworks: Symfony, Laravel, Yii, Zend, Phalcon, and so many, many, many more... All of them built by professionals and supported by big communities. So why on earth would a junior developer, who has just started his first job, try his hand in building yet another one?

Well, here’s why:

Continue reading…
(~5 min read)

A framework doesn’t have to be overly complex! Micrus provides you with a quick, easy and comfortable way of creating neatly structured, modular MVC websites, which can be easily extended and configured.

Our goal is to keep the framework as simple as possible, while offering all the most important features.

micrus.avris.it gitlab.com/Avris/Micrus

Forms are complicated. There are many things you must take into consideration: binding an existing object (if any) to each sparate field of the form, validating them after user has submited the form, if invalid redisplaying it with POST data bound and with validation errors, binding the data back to an object...

Avris Forms add an abstraction layer that handles all of that. You just need to define the list of fields you need and their cofiguration options. You’ll get an object that will handle everything for you. Just handle it in the controller and display it in the view.

gitlab.com/Avris/Forms

HTTP Request/Response abstraction

gitlab.com/Avris/Http

An extension to Avris Localisator and Avris Stringer introducing support for the Polish language.

gitlab.com/Avris/Polonisator
Avris Bag

Avris Bag is a set of helpers that make working with arrays in PHP way easier.

Continue reading…
(~4 min read)
gitlab.com/Avris/Bag
100% coverage - feels good!

Having 100% of LOC covered by unit tests certainly feels like a great achievement. But beware – that doesn’t necessarily mean your code is perfectly covered. Lines of code coverage is a really nice indicator of your app’s stability, but is can also hide some risks.

Continue reading…
(~6 min read)

A musical competition, in which the managers lead their countries every week to a fight for a title of the best song.

oursong.eurovote.eu

Konkurs muzyczny, w którym menadżerowie prowadzący wybrane przez siebie kraje z całego świata co tydzień rywalizują o miano najlepszego utworu.

oursong.eurovote.eu
Avris FunctionMock

FunctionMock is a simple and elegant way to mock away system/global functions in your tests.

Continue reading…
(~2 min read)
gitlab.com/Avris/FunctionMock

When I first heard the term “Autowiring”, I thought it sounds exciting. But when I learned more or less what is it about, I got pretty sceptical of the idea. Too much magic, too much implied information... However, when I finally used it for the first time... Gosh I wish I could never define services manually again!

Continue reading…
(~3 min read)

Finally. I got to work and rewrote the code of my sweet blog. Brand new design, new framework, Micrus, better support for language versions, a couple of new features in the admin panel, ditching custom comments for the awesomeness of Disqus, ditching TinyMCE for the beauty and simplicity of Markdown. It was a lot of work, but it was definitely worth it!

Hope you like it! :)

Wreszcie. Wziąłem się do roboty i przepisałem od zera kod mojego blogaska. Zupełnie nowy design, nowy framework, Micrus, lepsze wsparcie dla wersji językowych, parę nowych ficzerów w panelu administracyjnym, rzucenie własnego systemu komentarzy na rzecz zajebistości Disqusa, rzucenie TinyMCE dla piękna i prostoty Markdownu. Zajęło to sporo pracy, ale zdecydowanie było warto!

Mam nadzieję, że się spodoba! :)

How big does a framework need to be to provide you with a quick, easy and comfortable way of creating neatly structured MVC websites? That can easily be extended and configured?

Well, not big at all. Just try Micrus! Its goal is to keep it as simple as possible, while offering all the most important features, as listed here:

Continue reading… micrus.avris.it gitlab.com/Avris/Micrus

Jak duży musi być framework, aby umożliwiał szybkie, łatwe i wygodne tworzenie ładnie uporządkowanych stron MVC? Aby był łatwo rozszerzalny i konfigurowalny?

No właśnie wcale nie tak duży. Wypróbuj Micrusa! Jego celem jest bycie tak małym, jak to tylko możliwe, lecz oferować wszytkie najważniejsze funkcjonalności:

Continue reading… micrus.avris.it gitlab.com/Avris/Micrus

Dibsy helps team members to coordinate, which qa/staging server is currently being used by whom, and which ones are free to deploy to.

Developed as a 20% project @ Rocket Internet SE

dibsy.avris.it gitlab.com/Avris/Dibsy

Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that implements a certain algorithm. [source]

Picco is a tiny PHP web framework that only takes ~2,5 kB of space and has no dependencies on other libraries, while still providing quite a lot of features, being extensible and reasonably easy to use.

picco.avris.it gitlab.com/Avris/Picco

The idea is to create a simple (in terms of complexity, not ease of use) programming language, that will have quite a concisesyntax, that will play with the power of Unicode and most importantly – will be fun to create ;)

qc.avris.it gitlab.com/Avris/QC

Missing your cosy home? Come in to find out, if you can stop working already and head back home!

canigohome.avris.it gitlab.com/Avris/GoHome

W pewnym projekcie operuję poprzez API na liście wydań produktu: zamykam wydania, których czas już minął, i tworzę nowe na osiem tygodni naprzód. Moimi punktami odniesienia w czasie są:

Continue reading…
(~2 min read)

We all have lots of lots of passwords and access keys... Keeping them in a web browser or a window application is a good idea, but only until you need to share them with somebody.

Clavis can be installed on your PHP server (no 3rd party involved in storing your sensitive data). It lets you share your keys and be in control of what and with whom are you sharing.

It’s easy, safe, comfortable and totally free!

clavis.avris.it gitlab.com/Avris/Clavis

Wszyscy mamy wiele haseł i kluczy dostępu. Pamiętanie ich w przeglądarce internetowej albo w aplikacji okienkowej jest dobrym pomysłem, ale tylko dopóki będziesz potrzebował je z kimś współdzielić.

Clavis może być zainstalowany na Twoim serwerze PHP (żadna trzecia strona nie jest zaangażowana w przechowywanie Twoich danych wrażliwych). Pozwala Ci przechowywać Twoje klucze i kontrolować komu, co i kiedy udostępniasz.

Clavis jest prosty, bezpieczny, wygodny i całkowicie darmowy!

clavis.avris.it gitlab.com/Avris/Clavis

Uwaga, projekt przeniesiony: Avris Stringer

Avris Stringer to otwarta biblioteka PHP upraszczająca wiele operacji na stringach związanych z tworzeniem interfejsu użytkownika, a przede wszystkim z dostosowywaniem form gramatycznych języka polskiego do dynamicznych danych.

Continue reading… gitlab.com/Avris/Stringer gitlab.com/Avris/Stringer-Micrus gitlab.com/Avris/Stringer-Symfony

Może nie napiszę tu nic ciekawego, ale po prostu muszę się pochwalić :D Kupiłem sobie wirtualny serwer prywatny. Czyściutki Linux na nim, do zainstalowania i skonfigurowania wszystko: Apache, PHP, MySQL, SFTP, domeny, maile i cała masa innych pierdół. W wielu z nich grzebałem pierwszy raz w życiu. Ale chyba dogrzebałem się do wszystkiego co trzeba, bo wygląda na śmigające ślicznie.

Wreszcie mogę deployować po ludzku, z gitem i composerem, pisać w nowszej wersji PHP, skonfigurować sobie, co mi się tylko żywnie podoba, nie robić ręcznie eksportów rozkładu na Busa, któremu nie starczało pamięci na współdzielonym hostingu... Miodzio! :3

Książka Roberta C. Martina “Czysty kod” bije rekordy sprzedaży wśród pozycji dotyczących szeroko pojętej informatyki. Wstyd więc żebym jej nie przeczytał, no nie? I zdecydowanie polecam ją każdemu programiście, który chciałby być jak najlepszy w tym, co robi.

Chciałbym tutaj pokazać na konkretnym fragmencie kodu, jak wiele może zmienić stosowanie się do zasad przedstawionych przez Martina. Na przykładzie autoloadera.

Continue reading…
(~6 min read)

Ile treści można zmieścić w stu słowach? Sam zobacz! Na tej stronie zbieramy stosłowia – opowiadania na dowolny temat zawarte w jednym akapicie, nie dłuższe niż sto słów, ale posiadające fabułę, bohaterów i puentę. Sam też możesz je stworzyć i dodać do naszego zbioru!

stoslowia.avris.it twitter.com/Stoslowia

Zdjęcia legitymacyjne u fotografa kosztują kilkanaście złotych za cztery sztuki. Samo ich wywołanie jest jednak warte raptem kilkadziesiąt groszy. Jeśli sam potrafisz wykonać i zretuszować zdjęcie, możesz potem użyć poniższego narzędzia, by szybko przyciąć je i przeskalować do odpowiednich rozmiarów (35x45 mm). Następnie wystarczy wywołać je jak zwykłe zdjęcie 9x13 cm i ręcznie przyciąć nożyczkami.

cropper.avris.it gitlab.com/Avris/Cropper

Load more entries…