Skip to content

Instantly share code, notes, and snippets.

View Lusitaniae's full-sized avatar
🏺

Pedro Gomes Lusitaniae

🏺
View GitHub Profile
@Lusitaniae
Lusitaniae / nginx_error_rate.py
Last active May 23, 2017 14:47 — forked from bactisme/nginx_status_codes.py
Very simple munin plugin to graph nginx HTTP error codes
#!/usr/bin/python3
'''
Monitors error rates based on the Nginx access log.
By default triggers an warn alert at 2 req/s and critical for 4 req/s for each status code.
Some of the less common status codes have been commented out. Customize accordingly for yourself.
ALL FAME GOES HERE : https://gist.github.com/mipearson/1146151
Install:
wget https://gist.github.com/Lusitaniae/fb8532294b1cfba7aceffa1e2dd2a264 -O /usr/share/munin/plugins/nginx_error_rate;
@Lusitaniae
Lusitaniae / convert.py
Created May 2, 2020 10:24
Convert WordPress dump into Hugo content yml files
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xmltodict
import time
import hashlib
total_count = 0
m = hashlib.md5()
with open('wp.xml', 'rt', encoding="utf-8") as fd:

Keybase proof

I hereby claim:

  • I am lusitaniae on github.
  • I am lusitaniae (https://keybase.io/lusitaniae) on keybase.
  • I have a public key ASBwsC6x6iWedCY9-V8ASAiq1_HogDX218qM6OAMm1pAmQo

To claim this, I am signing this object: