Skip to content

Instantly share code, notes, and snippets.

View Richard87's full-sized avatar

Richard Hagen Richard87

View GitHub Profile
@Richard87
Richard87 / .zshrc
Last active November 20, 2023 08:32
zshrc config
View .zshrc
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
COMPLETION_WAITING_DOTS="true"
__kube_ps1()
{
yq '.current-context as $cur | .contexts[] | select(.name == $cur) | [$cur, .context.namespace] | join(":")' $HOME/.kube/config
}
@Richard87
Richard87 / ExpressionAction.md
Last active January 3, 2023 22:33
API Platform Expression Action
View ExpressionAction.md

A idea for a Expression action that have the ability to call a method directly on the resource.

Limitations:

  • Superficial implementation, requires id in the url, and no composite identifiers
  • No idea if this is a good idea or not :D might save some time when you need custom actions but don't feel like adding more classes than nessecary
  • strugling to provide defaults (null) to Action variables

How to use it:

new Action(
@Richard87
Richard87 / FeatureManager.php
Last active October 7, 2021 21:16
FeatureManager.php
View FeatureManager.php
/*
* License MIT
*/
<?php
namespace App\Service;
use Psr\Log\LoggerInterface;
use Symfony\Component\Security\Core\Security;
use Twig\Extension\AbstractExtension;
@Richard87
Richard87 / Eventsourcing Thougts.md
Last active September 24, 2021 16:05
Event sourcing Thoughts
View Eventsourcing Thougts.md

Event sourcing Thoughts

Smart DDD People

  • Vaughn Vernon
  • Eric Evans
  • Martin Fowler
  • Greg Young
  • Mathias Verraes
  • Mauro Serventi
View keybase.md

Keybase proof

I hereby claim:

  • I am richard87 on github.
  • I am richard87 (https://keybase.io/richard87) on keybase.
  • I have a public key ASB5c_-yQPfFh3AQ3HYFAuFccXf20V_X3FDKXAz5sv3HyAo

To claim this, I am signing this object: