Skip to content

Instantly share code, notes, and snippets.

View sdecandelario's full-sized avatar
⌨️
Happily coding

Sergio sdecandelario

⌨️
Happily coding
  • i-surance
  • Barcelona, Spain
View GitHub Profile

Keybase proof

I hereby claim:

  • I am sdecandelario on github.
  • I am sdecandelario (https://keybase.io/sdecandelario) on keybase.
  • I have a public key ASD3j1WhgRY-5yrEiz3NMluxNHLv8cSHNzoWHU08lehh5Qo

To claim this, I am signing this object:

@sdecandelario
sdecandelario / nodejs-npm-install.sh
Created November 2, 2017 19:47
Deployando una aplicación en NodeJS
#!/bin/bash
apt-get update
apt-get install -y nodejs npm
git clone https://github.com/juanmaguitar/fullstack-mini-project.git "$HOME/application"
cd "$HOME/application" || exit 0
git checkout 99c6efa
npm install
cat <<EOT > /etc/rc.local
#!/bin/bash
@sdecandelario
sdecandelario / fizz-buzz-extended-kata.md
Last active February 7, 2017 21:27
FizzBuzz extended kata

FizzBuzz extended kata

Introduction

The objective of the kata consists what, when a number is passed return a string if is dividible by another number

1st step

There are some rules:

  • Normal number return the same number
  • Numbers divisible by 3 return fizz
  • Numbers divisible by 5 return buzz
class AggregateRoot
{
private $recordedEvents = [];
protected function recordApplyAndPublishThat(DomainEvent $domainEvent)
{
$this->recordThat($domainEvent);
$this->applyThat($domainEvent);
$this->publishThat($domainEvent);
}