Skip to content

Instantly share code, notes, and snippets.

Alberto Zaccagni lazywithclass

Block or report user

Report or block lazywithclass

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
@lazywithclass
lazywithclass / trono.md
Last active Jun 2, 2019
Azioni e piani del Trono di Ferro
View trono.md

Trono di Ferro

Cose da fare per Darkhold

Scoprire:

  • Agenti, nomi e cognomi.
  • Rapporti con i Maghi Rossi.
  • chi ha detto ad Edward che Dalton e' uno Zentharim?
@lazywithclass
lazywithclass / giocata-soubar.md
Last active Mar 7, 2019
Leucosya prova a diventare borgomastro a Soubar
View giocata-soubar.md

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
lazywithclass / blog-post.md
Created Feb 20, 2017
Logging request body in HAProxy
View blog-post.md

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
@lazywithclass
lazywithclass / blog-post.md
Last active Feb 6, 2019
Looking at the most beautiful program ever written - part 1
View blog-post.md

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
global
log 127.0.0.1 local0
user root
group root
daemon
defaults
log global
mode http
option httplog
View blog-post.md

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
lazywithclass / winston-cloudwatch-type-definition.d.ts
Last active Dec 4, 2018
winston-cloudwatch-type-definition
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 {
@lazywithclass
lazywithclass / gist:2775023
Created May 23, 2012
working with casperjs and http status codes
View gist:2775023
var casper = require('casper').create({
httpStatusHandlers: {
404: function(self, resource) {
self.echo(resource.url + ' not found (404)');
},
500: function(self, resource) {
self.echo(resource.url + ' gave an error (500)');
}
},
verbose: true
@lazywithclass
lazywithclass / blog-post.md
Last active Jul 30, 2018
On tests, take home problems, and a HackerRank bookmarklet
View blog-post.md

On tests, take home problems, and a HackerRank bookmarklet - lazyblog

So recently I've been interviewing and as you can imagine that means doing take home problems and online tests.

I am not pointing fingers (so please continue hiring me lol), I am addressing the problem in the industry, because almost everyone is doing it in the same way, so you could say no one is directly responsible. Even though willingness to have a better process should be a thing.

@lazywithclass
lazywithclass / gist:1402417
Created Nov 28, 2011
Fibonacci tail recursion in Scheme
View gist:1402417
(define (fib n)
(define (iter a b count)
(if (<= count 0)
a
(iter b (+ a b) (- count 1))))
(iter 0 1 n))
You can’t perform that action at this time.