Skip to content

Instantly share code, notes, and snippets.

View calexandre's full-sized avatar
:shipit:
🤘

Carlos Alexandre calexandre

:shipit:
🤘
View GitHub Profile
@calexandre
calexandre / docker-prune.sh
Last active March 4, 2019 10:16
The following script executes a docker prune command and outputs the result to a log file. If the exit code is different from 0, it will output the result to stdout. This is very useful for crontabs since you'll only get alerted when the scripts write to the stdout.
(docker container prune -f --filter "until=24h" && docker volume prune -f && docker image prune -f -a --filter "until=24h") | ts "[%Y-%m-%d %H:%M:%S]" >> /var/log/docker-curator/docker-curator.log 2>&1
(docker container prune -f --filter "until=24h" && docker volume prune -f && docker image prune -f -a --filter "until=24h") | ts "[%Y-%m-%d %H:%M:%S]" >> /var/log/docker-curator/docker-curator.log 2>&1
public class Log4netTraceListener : TraceListener
{
public override void Write(object o)
{
base.Write(o);
}
public override void WriteLine(string message)
{
this.Write(message);
@calexandre
calexandre / macro.txt
Last active August 29, 2015 14:22
Portugal LDA - Macro
/2 {skull} Portugal LDA {skull} a recrutar malta para HFC (670 min ilvl). Todas as candidaturas sao analisadas com pormenor. {star} Raidamos regularmente em ambiente descontraido mas responsável {star}.