Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ssssssssk on github.
  • I am skado (https://keybase.io/skado) on keybase.
  • I have a public key ASDGVXgR0yaDeM6pHQb-s924iR-f1pMI4tNlPq_NwN5d-go

To claim this, I am signing this object:

#!/Users/steve/.pyenv/shims/python
# Thing to make new desktop backgrounds from my folder of research images
# On Linux I made this actually write to the desktop directly using feh, however, that's not really possible on a Mac. So I had it create a folder of graphics and then have the desktop settings choose from that directory at random.
from PIL import Image, ImageDraw
import os, random
from subprocess import call
## Colors from the Nord color scheme,
@ssssssssk
ssssssssk / tictac.py
Created February 20, 2021 01:10
Simple TicTacToe game.
import os
# Create a dictionary to store moves in.
spots = {'a1' : " ", 'b1' : " ", 'c1' : " ", 'a2' : " ", 'b2' : " ", 'c2' : " ", 'a3' : " ", 'b3' : " ", 'c3' : " "}
# list of moves that have already been made.
illegal_moves = []
# Don't let the game go on for ever.
turns = 10
@ssssssssk
ssssssssk / pomodoro-mpd.py
Created February 20, 2021 01:17
Shuffles and plays one play list for focus sessions and then pauses that playback and then shuffles and plays another playlist for break times. When it's time to focus again the playlist from before resumes.
import time
from mpd import MPDClient
from subprocess import Popen, PIPE
import os
# Create MPD Client
client = MPDClient()
client.timeout = 10
client.idletimeout = None