Skip to content

Instantly share code, notes, and snippets.

View follower46's full-sized avatar
😄
Ready to fix bugs!

Adam Shaw follower46

😄
Ready to fix bugs!
View GitHub Profile
@follower46
follower46 / Python Weekly Dynamic Bookmark
Last active July 20, 2022 20:12
Python Weekly Dynamic Bookmark
javascript:window.location="https://mailchi.mp/pythonweekly/python-weekly-issue-" + Math.round((new Date() - new Date(2011, 10, 7)) / (7 * 24 * 60 * 60 * 1000));
import math
class infinite_bar():
def __init__(self, x, y, width, height, oled):
self.inited = False
self.x = x
self.y = y
self.height = height
self.width = width
@follower46
follower46 / pico-8-volume.py
Last active May 4, 2022 18:00
Adds volume control to PICO-8 on the gameshell
# you need to `sudo pip install pyxhook` as it's used to intercept the volume presses
# you will also want to update your launcher to call this script (I just have mine in the pico-8 directory
# and have my PICO-8.sh run:
# SDL_VIDEODRIVER=x11 DISPLAY=:0 python /home/cpi/pico-8/pico-8-volume.py
# video of what it looks like: https://www.youtube.com/watch?v=BAoYapdMiPM
import pygame
import os
import pyxhook
import alsaaudio

Keybase proof

I hereby claim:

  • I am follower46 on github.
  • I am follower46 (https://keybase.io/follower46) on keybase.
  • I have a public key whose fingerprint is F3DB 8509 049B 5BFA 923F A1A6 0A8C 9106 3011 9538

To claim this, I am signing this object:

@follower46
follower46 / HumbleBundler.py
Last active August 18, 2016 20:54
Downloads all your owned content from Humble Bundle
import urllib2
import json
import os
import sys
from pprint import pprint
def download_files (type='MP3'):
""" Download the files on account of a specific type
@follower46
follower46 / ObjectStorageUploader.py
Last active November 20, 2017 15:30
Object Storage Uploader Script
# ================================================================================
# ObjectStorageUploader.py
# © Copyright IBM Corporation 2014.
# LICENSE: MIT (http://opensource.org/licenses/MIT)
# ================================================================================
import argparse
import os
import math
import http.client