Skip to content

Instantly share code, notes, and snippets.

View leodido's full-sized avatar
🚒

Leo Di Donato leodido

🚒
View GitHub Profile
@leodido
leodido / go-syslog-octet-couting-stream.go
Last active September 6, 2020 00:11
Usage example of go-syslog to parse a stream of syslog messages with octet-counting framing
package main
import (
"io"
"time"
"github.com/davecgh/go-spew/spew"
syslog "github.com/influxdata/go-syslog/v2"
"github.com/influxdata/go-syslog/v2/octetcounting"
)
@leodido
leodido / go-syslog-rfc5424-besteffort.go
Last active March 5, 2019 00:26
Usage example of go-syslog to parse RFC5424 message with best effort mode on
package main
import (
"fmt"
"github.com/davecgh/go-spew/spew"
"github.com/influxdata/go-syslog/v2/rfc5424"
)
func main() {
@leodido
leodido / syslog to influx.md
Last active January 16, 2023 21:06
Send docker syslogs to telegraf

Syslog to InfluxDB

docker => syslog (RFC5424, non-transparent) => telegraf => (*)

Docker can use syslog as a log driver.

Anyway it transport syslog message towards destination using the non-transparent framing technique (also if deprecated by the octet-counting).

Using the telegraf syslog input plugin link.

@leodido
leodido / how-to-download-all-jupyter-notebooks.md
Last active May 2, 2019 22:42
Create a TAR containing all the content of the jupiter server directory where this cell runs

How to

  1. Open your notebook
  2. Create a cell contain the python script
  3. Execute.

Get everything

  1. Open the root directory of your jupiter instance
  2. Create a new notebook
Verifying that "leodido.id" is my Blockstack ID. https://onename.com/leodido
### Keybase proof
I hereby claim:
* I am leodido on github.
* I am leodido (https://keybase.io/leodido) on keybase.
* I have a public key whose fingerprint is 6FB3 CD09 5FA1 CF66 8316 E159 BFFB 2449 0FD2 E91F
To claim this, I am signing this object:
@leodido
leodido / palettebycolor.json
Created June 29, 2016 13:36
Material Palettes
{
"RED": {
"50": "#ffebee",
"100": "#ffcdd2",
"200": "#ef9a9a",
"300": "#e57373",
"400": "#ef5350",
"500": "#f44336",
"600": "#e53935",
"700": "#d32f2f",
@leodido
leodido / skeleton-polymer.js
Last active May 31, 2016 09:19
ES2015 class skeleton for Polymer elements
'use strict';
let behaviors = Symbol('behaviors')
const SkeletonPolymerBehavior = {
// Define your behavior
};
class SkeletonPolymer {
@leodido
leodido / simple
Last active December 19, 2015 17:19
TSIS-CORSIM™ model called "Simple"
# Detector ID
01 D212
02 D121
03 D272
04 D721
05 D392
06 D931
07 D4412
08 D1141
@leodido
leodido / battisti-monza
Last active December 18, 2015 05:39
TSIS-CORSIM™ model for Viale Cesare Battisti, Monza - Italia
Informations about TSIS-CORSIM™ model for Viale Cesare Battisti, Monza - Italia.