Skip to content

Instantly share code, notes, and snippets.

View talarczykco's full-sized avatar

Michael Talarczyk talarczykco

View GitHub Profile

From your iOS device, go to Photos, then:

  • Select
  • Select All
  • Share (box w/arrow)
  • Save Images
  • Save to Camera Roll
  • ... then plug your iOS device into your Mac and upload the photos to a known location
  • Disable My Photo Stream in settings on all your devices
@talarczykco
talarczykco / install-old-homebrew-formulas.md
Last active July 25, 2024 22:53
How to install old versions of Homebrew formulas and switch between them

This example uses istioctl as the formula, but this may come in handy for kubernetes-cli, kubernetes-helm, etc.

  1. Find the formula for your executable, e.g. istioctl, and click on the link to GitHub:
    brew info istioctl | grep Formula
    
  2. Click "Blame" button ("History" will be too large to display).
  3. Hopefully, you can find an earlier versioned commit message... click on it.
  4. Click ... in upper-right of next page, select "View File" from drop-down.
  5. Right-click "Raw" button, and Copy URL Address.
@talarczykco
talarczykco / setup-python-logging.py
Last active August 12, 2020 18:22
Setup Python logging
# Created this after googling for:
# - python logging replace handler
# - python logging basicconfig not working
# - python logging getlogger
def get_logger(level='DEBUG'):
loghandler = logging.StreamHandler()
logfmt = logging.Formatter(fmt='%(asctime)s:%(name)s:%(levelname)s:%(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
logger = logging.getLogger() # get root logger, not __name__
loghandler.setFormatter(logfmt)
@talarczykco
talarczykco / provision-proxmox-template.sh
Last active September 14, 2022 00:57
Provision a Proxmox VM template from an Ubuntu cloud image
#!/bin/bash
# https://gist.github.com/talarczykco/d4cfc9188a061f68880ee5b630a4aeb6
# https://pve.proxmox.com/wiki/Cloud-Init_Support
set -ex
IMGURL=https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
IMGDIR=etc
IMGFILE=$(basename $IMGURL)