Skip to content

Instantly share code, notes, and snippets.

View mickume's full-sized avatar

Michael Kuehl mickume

View GitHub Profile
@mickume
mickume / keybase.md
Created July 20, 2016 13:12
keybase.md

Keybase proof

I hereby claim:

  • I am mickuehl on github.
  • I am ratchetcc (https://keybase.io/ratchetcc) on keybase.
  • I have a public key whose fingerprint is B26A 7E40 5527 54CF DF08 D14A A11B A211 C0A2 5963

To claim this, I am signing this object:

@mickume
mickume / coreos-docker.md
Created September 29, 2019 08:36 — forked from timlinux/coreos-docker.md
Setting up a hetzner machine with coreos

This gist describes how to set up a new machine running coreos.

Create an ssh key

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa_kartoza99

Get the public key:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import io
import time
import logging
import traceback
import socketserver
import argparse
import picamera
@mickume
mickume / gist:ce777835d33fbdb5e86a12d1e7fb4cc8
Created March 18, 2022 19:56
Install Tensorflow on a M1 Mac
#### Tensorflow on a M1 Mac
```shell
brew install hdf5
# https://stackoverflow.com/questions/70670205/failed-to-build-h5py-on-mac-m1
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.13.0/
pip install --no-binary=h5py h5py
# https://developer.apple.com/forums/thread/691317
import datetime
# string to datetime
dt_s = "2020-04-01 10:17:43"
dt = datetime.datetime.strptime(dt_s, "%Y-%m-%d %H:%M:%S")
print(dt)
# datetime to unixtime
ts = int(dt.timestamp())
@mickume
mickume / README.md
Created November 16, 2022 08:14 — forked from jamesramsay/README.md
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
oc new-project $NAME
oc new-app sonatype/nexus
oc rollout pause deployment/nexus
oc expose svc/nexus
oc set probe deployment/nexus --liveness --failure-threshold 3 --initial-delay-seconds 30 -- echo ok
oc set probe deployment/nexus --readiness --failure-threshold 3 --initial-delay-seconds 30 --get-url=http://:8081/nexus/content/groups/public
oc volumes deployment/nexus --add --name 'nexus-volume-1' --type 'pvc' --mount-path '/sonatype-work/' --claim-name 'nexus-data' --claim-size '10G' --overwrite
oc rollout resume deployment/nexus
@mickume
mickume / gist:818901a0438843acc9b3e79ee790292b
Created June 9, 2023 05:44
Local Python development setup
## Local development
#### Python virtual environment
```shell
pip install virtualenv
python3 -m venv venv
source venv/bin/activate
@mickume
mickume / qemu_osx_rpi_raspbian_jessie.sh
Created July 11, 2023 05:11 — forked from hfreire/qemu_osx_rpi_raspbian_jessie.sh
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location