Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am blizzke on github.
  • I am blizzke (https://keybase.io/blizzke) on keybase.
  • I have a public key ASABLAxysPWgs1OW_d-KGnfjYnkmsmUiEJMwb__bIU5M9go

To claim this, I am signing this object:

@Blizzke
Blizzke / adb_touch.py
Last active June 6, 2020 10:11
Correct create and modify times of the images/videos based on the filename on my new android device
import subprocess
from subprocess import PIPE
if __name__ == '__main__':
source = '/storage/self/primary/DCIM/Camera'
files = subprocess.run(["/usr/local/bin/adb", "shell", f"ls -1 {source}"], check=False,
stdout=PIPE).stdout.splitlines()
print(f'{len(files)} files found.')
import re
@Blizzke
Blizzke / flash.sh
Last active January 31, 2021 14:38
OctoPrint CLI flasher for Prusa MK2, MK3 and MMU2
#!/usr/bin/env bash
#
# This script was created to flash firmwares for the MK2, MK3 and the MMU2,
# all from the command line of your OctoPrint installation.
#
# The script assumes that you have avrdude and jq installed on your raspbian and that you
# have filled the API key below.
#
# Usage: flash.sh mk2|mk3|mmu2 firmware.hex