Skip to content

Instantly share code, notes, and snippets.

Diego Castorina Diego81

Block or report user

Report or block Diego81

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Diego81
Diego81 / enable php
Created May 4, 2018
enable errors in php
View enable php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
@Diego81
Diego81 / retry.php
Created May 4, 2018
Guzzle Http client retry
View retry.php
require './vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
@Diego81
Diego81 / WordCounter.scala
Last active Dec 7, 2018
Simple Word Counter implemented using Akka
View WordCounter.scala
import akka.actor.{ Actor, ActorRef, Props, ActorSystem }
case class ProcessStringMsg(string: String)
case class StringProcessedMsg(words: Integer)
class StringCounterActor extends Actor {
def receive = {
case ProcessStringMsg(string) => {
val wordsInLine = string.split(" ").length
sender ! StringProcessedMsg(wordsInLine)
You can’t perform that action at this time.