Skip to content

Instantly share code, notes, and snippets.

View SelrahcD's full-sized avatar

Charles SelrahcD

View GitHub Profile
@SelrahcD
SelrahcD / resume.json
Last active March 28, 2024 08:35
resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Charles Desneuf",
"label": "Software Architect & Tech Coach Freelance",
"image": "./charles.png",
"email": "c.desneuf@gmail.com",
"phone": "+33 06 26 14 82 73",
"url": "https://www.charlesdesneuf.com",
"summary": "I trully believe that it is the combination of a real problem, an appropriate organization, a well-thought-out product, and quality tech that creates value for users. I view myself as someone who connects the various skills of my clients' teams, opens the doors to other ideas, to help them create the best possible solutions.\n\n I do this by bringing a mix of technical and architectural skills, facilitation technics, an interest for product management and an agile mindset.",
@SelrahcD
SelrahcD / template.xml
Created June 13, 2022 08:32
Phpstorm Wither live template
<template name="with" value="public function with$NAME$($PARAMETER_TYPE$ $$$PARAMETER_NAME$): self&#10;{&#10;&#9;$clone = clone $this;&#10;&#9;&#10;&#9;$clone-&gt;$PARAMETER_NAME$$END$ = $$$PARAMETER_NAME$;&#10;&#9;&#10;&#9;return $clone;&#10;}" description="Create a wither" toReformat="false" toShortenFQNames="true">
<variable name="PARAMETER_TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PARAMETER_NAME" expression="complete()" defaultValue="" alwaysStopAt="true" />
<variable name="NAME" expression="" defaultValue="capitalize(PARAMETER_NAME)" alwaysStopAt="false" />
<context>
<option name="PHP Class Member" value="true" />
</context>
</template>
@SelrahcD
SelrahcD / commits.csv
Last active October 27, 2019 21:10
Dataset
date commit_count system
2015-01 110 1
2015-02 150 1
2015-03 235 1
2015-04 202 1
2015-05 270 1
2015-06 161 1
2015-07 199 1
2015-08 190 1
2015-09 246 1
@SelrahcD
SelrahcD / exceptionalEvents.php
Last active April 13, 2018 09:15
Exceptional Events
<?php
class User {
private $beers = 0;
public $id;
/**
* User constructor.
*/
public function __construct($id) {
Time sheet system
In my opinion we have two options :
1) The notion of time sheet is only a view concept (I want to see all entries of week #10) :
* a TrackTime command that only creates a new entry in a list and takes the (time; imputation) as parameters
* TimeSheet is a projection of the entries, here probably a subset of the list entries
2) The notion of time sheet is important in domain (I don't have an example...) :
* a TrackTime command that adds an entry for that specific time sheet and takes (timesheetId; time; imputation) as parameters
@SelrahcD
SelrahcD / TypeTest.php
Last active November 9, 2016 09:32
TypeTest.php
<?php
class Type {
const TYPE_A = 1;
const TYPE_B = 2;
const TYPE_C = 3;
private $type;
private function __construct($type)
<?php
$str = "Something";
$stringValue = array_reduce(str_split($str), function($carry, $char) {
return $carry + ord($char);
}, 0);
while($stringValue > 10)
{
@SelrahcD
SelrahcD / talks.md
Last active January 15, 2018 13:04
<?php
class Discussion
{
private $id;
private function __construct(DiscussionId $discussionId)
{
$this->id = $discussionId;
}
@SelrahcD
SelrahcD / gist:c5d4f03b61860ecb174e
Created January 22, 2015 10:00
Perf test method
function test($closure, $name = null, $loop = 1000000) {
$start = microtime(true);
for($i = 0; $i < $loop; $i++) {
$closure();
}
$time = microtime(true) - $start;
if($name) {