Skip to content

Instantly share code, notes, and snippets.


Alberto Zaccagni lazywithclass

View GitHub Profile
lazywithclass /
Last active Jun 1, 2021
Looking at the most beautiful program ever written - part 1

Looking at the most beautiful program ever written - part 1

I am going to have a look at what William Byrd presented as The most beautiful program ever written.

Beauty here refers to computer programs, specifically about Lisp. There might be errors as this is something I wrote to make sense of that interpreter, proceed at your own risk.

Thanks a lot to Carl J. Factora for the help.

The program

View Sample HAProxy conf with req.body logging
log local0
user root
group root
log global
mode http
option httplog
lazywithclass /
Last active Feb 9, 2021
On whiteboard interviews

On whiteboard interviews - lazyblog

What follows is my highly opinionated point of view on the matter, I tried to write the few things I know and think about whiteboard interviews. I hope this helps. If you don't agree with something just comment below, email me, whatever works for you, I want to hear different point of views, me being salty doesn't affect my willingness to listen to people and change my mind.

Also sorry for the wall of text.

lazywithclass / gist:1402456
Created Nov 28, 2011
Fibonacci tail recursion in Java
View gist:1402456
public static long tailRecursive(long n) {
if (n <= 2) {
return 1;
return tailRecursiveAux(0, 1, n);
private static long tailRecursiveAux(long a, long b, long count) {
if(count <= 0) {
return a;
lazywithclass /
Last active Jul 9, 2020
Azioni e piani del Trono di Ferro

Trono di Ferro

Cose da fare per Darkhold


  • Agenti, nomi e cognomi.
  • Rapporti con i Maghi Rossi.
  • chi ha detto ad Edward che Dalton e' uno Zentharim?
lazywithclass /
Created Oct 10, 2017
[Teaching programming] Lesson one

[Teaching programming] Lesson one - lazyblog

I hate to use "teaching" and "lesson", but those are the easiest words that come to mind right now.

I will be teaching a friend of mine how to program, from zero to (hopefully) web dev so she can see if it could be something she would like to do for a living.

The book

To give her the basic concepts I am going to use The Little Schemer. I feel like it's

lazywithclass /
Last active Mar 7, 2019
Leucosya prova a diventare borgomastro a Soubar

Giocate per candidatura di Leucosya a Soubar

Potete usare questo file come riferimento alla giocata che stiamo preparando.

Giocate post cambio identita'

Qui raccolgo le giocate cosi vi fare un'idea ancora migliore di cio' che e' successo. Come potete immaginare ci sono cose minori che limo in game, capendo esattamente la situazione in cui sono, purtroppo non ho il tempo, e le facolta' mentali (:D), per comprendere tutte le possibili sfumature. Spero che questa iniziativa di raccogliere tutte le giocate possa essere utile a tutti :D

lazywithclass /
Created Feb 20, 2017
Logging request body in HAProxy

Logging request body in HAProxy

On the 14th of October HAProxy 1.6 was released! Among all features announced I am particularly interested in the ability to log the body of a request.

It wasn't straightforward for me to understand how to do that, which is why I'm blogging it.

The relevant part could be found in the "Captures" section of the announcement, this is how I changed it to suit my needs:

# you need this so that HAProxy can access the request body

161 - lazyblog

The end of 7 long months

It started in March 2017 and it ended this afternoon 19/09/2017, when I finally realised I am going to sign with this company.

The numbers

lazywithclass / winston-cloudwatch-type-definition.d.ts
Last active Dec 4, 2018
View winston-cloudwatch-type-definition.d.ts
import * as winston from 'winston';
import * as Transport from 'winston-transport';
import { CloudWatch, CloudWatchLogs } from 'aws-sdk';
export namespace WinstonCloudWatch {
export type LogObject = {level: string, msg: string, meta?: any};
export interface CloudWatchIntegration {