Skip to content

Instantly share code, notes, and snippets.

View netstx's full-sized avatar

Rafael Possamai netstx

View GitHub Profile
@netstx
netstx / cronic-v3.sh
Created May 12, 2021 02:51
Cronic is a small shim shell script for wrapping cron jobs so that cron only sends email when an error has occurred.
#!/bin/bash
# Cronic v3 - cron job report wrapper
# Copyright 2007-2016 Chuck Houpt. No rights reserved, whatsoever.
# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/
set -eu
TMP=$(mktemp -d)
OUT=$TMP/cronic.out
@netstx
netstx / route53_iam_certbot_policy
Created March 2, 2021 21:13
AWS Route53 IAM policy for CertBot DNS verification
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"route53:GetHostedZone",
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets"
@netstx
netstx / gist:2af27a9333d53ab41196ae3b9f23908b
Created February 28, 2021 04:21 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@netstx
netstx / getwallpapers.sh
Created December 4, 2020 05:05 — forked from giventofly/getwallpapers.sh
wget unsplash wallpapers
#!/bin/bash
for i in {1..25}; do wget https://source.unsplash.com/featured/1920x1080/\?dogs -O "$(ls -l | wc -l).jpg" && sleep 2; done