Skip to content

Instantly share code, notes, and snippets.

View jhaubrich's full-sized avatar

Jesse Haubrich jhaubrich

View GitHub Profile
#!/usr/bin/env zsh
print -n "Does the new linux and zfs-git use the same kernel verision?
https://www.archlinux.org/packages/core/x86_64/linux/
https://aur.archlinux.org/packages/zfs-git/
"
read -q REPLY
if [[ $REPLY == "y" ]] ; then
set -x
@jhaubrich
jhaubrich / arch_macbook.md
Last active November 28, 2021 22:53
(historic) Arch Linux on a MacBookPro 11,3 on 2015-03-05 with kernel 3.18.6-1-ARCH

Arch Linux on a MacBookPro 11,3

Read The Arch Way, fall in love you lose.

TODO

I can't believe how smoothly this went...

  • suspend - seems to work after installing gnome, pm-suspend works too... I have my eye on you. <.<
    • systemctl suspend works, but doesn't wake properly.
  • power management
@jhaubrich
jhaubrich / 14.10.md
Last active August 29, 2015 14:16
Ubuntu 14.10 on a 2014 Retina MacBook (MacBookPro11,3).

Ubuntu 14.10 on a MacBook

Most everything works out of the box. Except when it doesn't. While the installation when smooth, and everything seemed to be working without any fuss after two days of running 14.10 I find suspend breaks randomly. Kworker goes crazy on an entire cpu core, and I've pulled it out of my bag more than once where it has woke up, unresponsive, running hot, and the fan on high. At this point it requires a hard shutdown. The truely frustrating thing, however, is that since the system has been preconfigured it's not at all clear how to troubleshoot, config files are managed by scripts, and I find the ubuntu forums and wiki generally unhelpful.

still needs fixing

  • Thunderbolt ethernet isn't hot swappable (this is fixed in kernel 3.18)
  • ctrl-alt-F1 shows blank screen (on nvidia drivers, probably a kernel option)
  • External monitor sends kworker into a frenzy, 90% cpu, and doesn't return to normal when unplugged.
  • External monitor breaks suspend, and suspend
@jhaubrich
jhaubrich / gist:7a4080fdf205b8234edb
Last active August 29, 2015 14:16
Ubuntu 14.04 on a 2014 Retina MacBook (MacBookPro11,3).

Ubuntu 14.04 on a MacBook

Make a USB Stick

reference.

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
sudo dd if=/path/to/downloaded.img of=/dev/disk1 bs=1m 
comm_status_names = []
for num in range(13):
for name in ['comm_status', 'node_id']:
comm_status_names.append("{name}_{num:02d}".format(**locals()))
@jhaubrich
jhaubrich / gist:3ed428e1907b51ebcd1a
Last active August 29, 2015 14:13
Fixing English -- Submit patches in comments for now
In the first year, "s" will be used instead of the soft "c."
Sertainly, sivil servants will resieve this news with joy. Also, the
hard "c" will be replaced with "k". Not only will this klear up
konfusion, but typewriters kan have one less letter.
There will be growing publik emthusiasm in the sekond year, when the
troublesome "ph" will be replaced by "f". This will make words like
fotograf" 20 persent shorter.
In the third year, publik akseptanse of the new spelling kan be
for item in sig_events:
if ["28","34", "60", "53", "29"].intersection(sig_dict[key][4]):
@jhaubrich
jhaubrich / docker_events.py
Created June 19, 2014 15:35
docker event reader - Just prints out docker events. Find the docker host from the environment variable DOCKER_HOST
import os
import json
import requests
def read_stream(stream):
raw_json = ''
for ch in stream.iter_content():
raw_json += ch
@jhaubrich
jhaubrich / gist:c1bc34940bec62e328ac
Created June 16, 2014 20:09
This is what happens with you replace a docker image with a new image of the same name. It keeps the old image, moves the tag to point at the new image, and the running container continues to point at the old image.
MCP · (master) ⟩ docker images; docker ps ~/s/MCP
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
sog/mcp latest 37a694e7ca0e 3 weeks ago 489 MB
<none> <none> 3560e045ada2 7 weeks ago 489 MB
<none> <none> 5affacbae672 7 weeks ago 489 MB
<none> <none> bba7aff6f597 7 weeks ago 489 MB
<none> <none> 6e67e654bb4a 7 weeks ago 489 MB
<none> <none> 2cd914b12ec9 7 weeks ago 489 MB
<none> <none> eb6d36a5621b 7 weeks ago 489 MB
<none> <none> bc5d6787c2c8 7 weeks ago 489 MB
@jhaubrich
jhaubrich / GUS_ID.py
Last active August 29, 2015 14:02
Atomize GUS receiver DATA
GUS_ID = {
94: dict(site='APC', location='Napa Valley, CA'),
98: dict(site='HDH', location=''),
102: dict(site='BRE', location=''),
106: dict(site='SZP', location=''),
118: dict(site='LTN', location=''),
194: dict(site='WBN', location='')}