Skip to content

Instantly share code, notes, and snippets.

@realazaber
realazaber / find-fields.html.twig
Created September 3, 2025 14:19
Snippet to see all available fields in a twig template.
<ol>
{% for key, value in _context %}
<li>{{ key }}</li>
{% endfor %}
</ol>
@realazaber
realazaber / Result.cs
Created August 19, 2025 10:27
My custom implementation of a Result class to use in C# instead of Exceptions.
public class Result
{
public bool IsSuccess { get; }
public string Message { get; }
protected Result(bool successful, string message)
{
IsSuccess = successful;
Message = message;
}
@realazaber
realazaber / docker-compose.yml
Created July 14, 2025 13:56
Docker compose to spin up a mysql database connected to phpmyadmin in less than a minute.
version: "3.8"
services:
db:
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: root1235*
MYSQL_DATABASE: databaseName
MYSQL_USER: admin