Skip to content

Instantly share code, notes, and snippets.

David Fernández driade

Block or report user

Report or block driade

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
driade / send.php
Created Sep 18, 2018
Send failed messages back to the queue. PHP, Exim4
View send.php
* This horrible script takes a folder with returned messages and tries to send them again back to the queue.
* Imagine an scenario where your mail server has been offline or unable to send mails for a few days, and the messages fail, so what you have is a copy of them stating it was impossible to deliver them.
* Tested with Exim4. Provided as is.
$fp = opendir('input');
driade /
Created Dec 30, 2016
Test gz files recently accessed on this directory, recursively, an ensures they can be decompressed
for file in `find ./ -atime 0 -name "*.gz"`
if ! gunzip -t $file &>/dev/null
echo "Bad file $file\n"
driade / gist:4e4757ceb7a0da44bc1c
Created Sep 4, 2015
Quick and dirty node script to convert laravel docs into PDF
View gist:4e4757ceb7a0da44bc1c
var fs = require("fs")
var markdownpdf = require("markdown-pdf")
var dir= 'tmp-laravel-docs'
var exec = require('child_process').exec
exec("git clone "+dir, function (error, stdout, stderr) {
var data=fs.readdirSync(dir)
.filter(function (path) {
return (path.indexOf('.md')!=-1);
You can’t perform that action at this time.