Skip to content

Instantly share code, notes, and snippets.

View inputsh's full-sized avatar
👋
Mostly moved to GitLab

Aleksandar Todorović inputsh

👋
Mostly moved to GitLab
View GitHub Profile
@inputsh
inputsh / README.md
Last active April 21, 2018 22:34
Sets GNOME background to XKCD of the day

This script sets your GNOME background to the inverted version of the latest XKCD comic in 20ish lines of Python.

Prerequisites:

pip install requests bs4

Download the script, and add the following line to crontab -e to fetch the photo every three hours:

#!/usr/bin/env python
from bs4 import BeautifulSoup
import requests
import sys
from math import ceil
from geoip import geolite2
import socket
BASE_URL='http://www.alexa.com/topsites/countries;%d/%s'
### Keybase proof
I hereby claim:
* I am aleksandar-todorovic on github.
* I am r3bl (https://keybase.io/r3bl) on keybase.
* I have a public key ASC1tIwiPS1PCjFbwHzvmQIW5twO2wKSURG5BHZXrdCYXAo
To claim this, I am signing this object: