Skip to content

Instantly share code, notes, and snippets.

View agseco's full-sized avatar

Alejandro Garcia Seco agseco

View GitHub Profile
@agseco
agseco / json-to-files.js
Created June 17, 2019 07:25
JSON stream to multiple files
'use strict';
const fs = require('fs');
const path = require('path');
const { Writable } = require('stream');
class JSONToFiles extends Writable {
constructor (options, params) {
super(options);
@agseco
agseco / logrotate.md
Created May 28, 2018 10:13
Logrotate - Configuration to rotate hourly

/etc/cron.hourly/logrotate

#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.hourly.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0

Keybase proof

I hereby claim:

  • I am agseco on github.
  • I am agseco (https://keybase.io/agseco) on keybase.
  • I have a public key whose fingerprint is B2BF C592 A547 2A79 DFAE 28A9 DDBC 1361 E9D1 73B2

To claim this, I am signing this object: