Skip to content

Instantly share code, notes, and snippets.

🐍
Taming Python

Philipp Klaus pklaus

🐍
Taming Python
Block or report user

Report or block pklaus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pklaus
pklaus / Issues with Mac Mini 2018 running Linux from M.2 SSD in a IB-1817M-C31 USB-C Case.md
Last active Jul 23, 2019
Issues with Mac Mini 2018 running Linux from M.2 SSD in a IB-1817M-C31 USB-C Case
View Issues with Mac Mini 2018 running Linux from M.2 SSD in a IB-1817M-C31 USB-C Case.md

Issues with Mac Mini 2018 running Linux from M.2 SSD in a IB-1817M-C31 USB-C Case

As the internal SSD is hidden behind the encryption done by the T2 chip, the Linux system has to be on some external storage. For now, I'm using my M.2 SSD on a Raidsonic Icy Box IB-1817M-C31 USB-C case equipped with a JMicron USB to PCIE Bridge (JMS583 chipset). Its connection resets sometimes (~ 3x per hour resulting in system stall of ~1 min – annoying).

Offtopic:

Later I want to use a i-tec MySafe Thunderbolt 3 M.2 NVMe (PN: TB3MYSAFEM2). I ordered it almost two months ago but they seem to have difficulties producing it in reasonable amounts. Hope I get my hands on it soon and the issue in this gist might disappear!

View Issues with Mac Mini 2018 running Linux - Fan Control.md

Issues with Mac Mini 2018 running Linux Resulting in Broken Fan Control

The Linux kernel module applesmc fails to load on a Mac Mini 2018. The attached log is a try to load it via modprobe on Kernel 5.2.2-arch1-1-ARCH.

@pklaus
pklaus / Hardware of Mac Mini 2018 as seen by Linux.md
Last active Jul 23, 2019
Hardware of Mac Mini 2018 as seen by Linux
View Hardware of Mac Mini 2018 as seen by Linux.md

Hardware of Mac Mini 2018 as seen by Linux

The operating system used is Arch Linux w/ Kernel 5.2.2-arch1-1-ARCH.

Issues:

  • Fan control isn't working (s the system gets hot) as the applesmc module doesn't load, see this gist.
  • As the internal SSD is hidden behind the encryption done by the T2 chip, the Linux system has to be on some external storage. For now, I'm using my M.2 SSD on a IB-1817M-C31 USB-C Case. This connection resets sometimes (~ 3x per hour resulting in system stall of ~1 min). See this gist
View Intel X550-T2 – as seen by lspci.md

sudo lspci -vv for an Intel X550-T2 (operated at PCIe 2.0 x4 instead of PCIe 3.0 x4)

@pklaus
pklaus / run_docker_x11.sh
Last active May 13, 2019 — forked from slok/run_docker_x11.sh
x11 with docker archlinux
View run_docker_x11.sh
#!/bin/bash
KEY=$(xauth list | grep "$(hostname)/unix:0" | awk '{ print $3 }' | head -n 1)
CONT_HOSTNAME=docker-skype
xauth add $CONT_HOSTNAME/unix:0 . $KEY
docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/.Xauthority:/tmp/.Xauthority \
-v /dev/snd:/dev/snd \
-e DISPLAY=unix$DISPLAY \
@pklaus
pklaus / balzerspkg020.py
Last active Sep 9, 2019
Balzers PKG 020 Vacuum Gauge Controller : Analog Out
View balzerspkg020.py
#!/usr/bin/env python
tables = {
'ikr': [
[0.09, 5.00E-008],
[0.24, 1.00E-007],
[0.34, 1.50E-007],
[0.45, 2.00E-007],
[0.67, 3.00E-007],
[0.86, 4.00E-007],
View LICENSE.TXT
Copyright (C) 2017 LabJack Corporation <support@labjack.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@pklaus
pklaus / dmesg.txt
Created Nov 30, 2018
LabJack T7: as it shows up on Arch Linux (Kernel 4.19.4-arch1-1-ARCH)
View dmesg.txt
[ 1003.575895] usb 1-3: new full-speed USB device number 6 using xhci_hcd
[ 1003.718331] usb 1-3: New USB device found, idVendor=0cd5, idProduct=0007, bcdDevice= 0.00
[ 1003.718340] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1003.718354] usb 1-3: Product: LabJack T7
[ 1003.718359] usb 1-3: Manufacturer: LabJack LLC
@pklaus
pklaus / anyrun
Last active Apr 15, 2019
A utility to run different instructions found in a configurable folder (env var ANYRUN_INSTRUCTIONS_FOLDER).
View anyrun
#!/bin/env python
"""
Run a script given as argument.
./anyrun your_script_file
This would check the search folder (--search-folder or env var ANYRUN_SEARCH_FOLDER)
for a file named your_script_file and execute it in a shell environment.
You can’t perform that action at this time.