Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Writing and Coding

capjamesg capjamesg

💻
Writing and Coding
View GitHub Profile
@capjamesg
capjamesg / analytics.sh
Created Oct 7, 2020
A bash script to parse my nginx access logs.
View analytics.sh
#!/bin/bash
rm /home/james/logs/*
log_files=/home/james/logs/
# Copy log files to temporary directory
cp /var/log/nginx/access*.gz $log_files
@capjamesg
capjamesg / webmention_feed.py
Created Oct 3, 2020
Convert webmention.io JSON to an RSS feed.
View webmention_feed.py
import json
import requests
import datetime
from feedgen.feed import FeedGenerator
# Retrieve most recent 10 webmentions
open_feed = requests.get("WEBMENTION_IO_API_URL")
fg = FeedGenerator()
You can’t perform that action at this time.