Skip to content

Instantly share code, notes, and snippets.

View Richard87's full-sized avatar

Richard Hagen Richard87

View GitHub Profile
@Richard87
Richard87 / install-tools.md
Last active September 23, 2024 09:01
install-tools.sh

Initial setup:

source /etc/lsb-release
eval `ssh-agent -s`
ssh-keygen -t ed25519
cat id_ed25519.pub

sudo apt-get update
sudo apt-get install -y ca-certificates curl wget vim apt-transport-https lsb-release gnupg zsh git libfuse2 libxi6 libxrender1 libxtst6 mesa-utils libfontconfig libgtk-3-bin tar
@Richard87
Richard87 / .zshrc
Last active March 12, 2024 11:27
zshrc config
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

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 / bounded-context.md
Last active May 4, 2022 11:14
DDD Workshop
@Richard87
Richard87 / FeatureManager.php
Last active October 7, 2021 21:16
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

Event sourcing Thoughts

Smart DDD People

  • Vaughn Vernon
  • Eric Evans
  • Martin Fowler
  • Greg Young
  • Mathias Verraes
  • Mauro Serventi

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: