Skip to content

Instantly share code, notes, and snippets.

@kkreft
kkreft / git_release_changelog.md
Created October 26, 2023 07:52
git release changelog

From the release/* branch run

git log --no-merges master..$(git branch --show-current) --format="%s"

To select more than a screen shows in the Postman Console try to change

.console-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

to

@kkreft
kkreft / custom-handler.php
Created May 24, 2022 12:31 — forked from rockoo/custom-handler.php
Custom error handler for stack trace Medium article
<?php
set_exception_handler( function(\Exception $e) {
$rows = "\n ========= \n";
$exception = sprintf(
"Exception: %s \n Origin: %s on line %s \n",
$e->getMessage(),
$e->getFile(),
$e->getLine()
);
@kkreft
kkreft / foo.php
Last active August 25, 2022 09:37
<?php
interface Foo {
public function foo(string $message): string;
}
interface Bar {
public function process(string $message): string;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
background: lightblue;
}
https://speakerdeck.com/hofstef/domain-storytelling-1-day-workshop-at-ddd-eu-2019
https://www.wps.de/modeler/
https://www.yworks.com/yed-live/
@kkreft
kkreft / generatorForEach.php
Created November 8, 2018 08:31 — forked from hollodotme/generatorForEach.php
Comparison of generator with foreach and yield from
<?php declare(strict_types=1);
class Test
{
private $arr = [];
public function __construct()
{
for ( $i = 0; $i < 10000; $i++ )
{
@kkreft
kkreft / docker.sh
Created June 7, 2018 19:55
Stop and removing all docker containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@kkreft
kkreft / filtering_numeric_array.php
Created April 13, 2018 09:01
Filtering numerics in array
$ids = array_filter($ids, 'is_numeric');