Skip to content

Instantly share code, notes, and snippets.

@gdahlm
gdahlm / usr.bin.run_keybase
Last active May 22, 2019
Apparmor profile for Keybase.io to prevent insecure and multi-user unfriendly use of /keybase; will prevent start unless run_keybase is modified.
View usr.bin.run_keybase
#include <tunables/global>
# At the time of writing requires changing /usr/bin/run_keybase
# Partial diff, which may or may not work for your needs.
#
# - if fusermount -uz /keybase &> /dev/null ; then
# + if fusermount -uz $HOME/Keybase &> /dev/null ; then
#
# - kbfsfuse -debug -log-to-file /keybase &>> "$logdir/keybase.start.log" &
# + kbfsfuse -debug -log-to-file $HOME/Keybase &>> "$logdir/keybase.start.log" &
View keybase.md

Keybase proof

I hereby claim:

  • I am gdahlm on github.
  • I am gdahlman (https://keybase.io/gdahlman) on keybase.
  • I have a public key ASBjvxhQRqSmqC0WqinWzt4Is6-l4Qg2E3hExsOEsJyQZAo

To claim this, I am signing this object:

View gist:30e62516448b6dfaff095f1876bb21b6
diff --git a/lib/ansible/modules/remote_management/wakeonlan.py b/lib/ansible/modules/remote_management/wakeonlan.py
index 5308901f59..195f14b0af 100644
--- a/lib/ansible/modules/remote_management/wakeonlan.py
+++ b/lib/ansible/modules/remote_management/wakeonlan.py
@@ -97,10 +97,10 @@ def wakeonlan(module, mac, broadcast, port):
module.fail_json(msg="Incorrect MAC address format: %s" % mac_orig)
# Create payload for magic packet
- data = ''
- padding = ''.join(['FFFFFFFFFFFF', mac * 20])
@gdahlm
gdahlm / Dockerfile
Created May 21, 2017
Dockerfile for launching a Jupyter notebook container.
View Dockerfile
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
# Add Tini. Tini operates as a process subreaper for jupyter. This prevents
# kernel crashes.
ENV TINI_VERSION v0.6.0
@gdahlm
gdahlm / docker-compose.yaml
Created May 21, 2017
Jupiter Notebook Docker Compose yaml
View docker-compose.yaml
version: '2'
services:
notebook:
build: .
command: jupyter notebook --port=8887 --no-browser --ip=0.0.0.0 --allow-root
volumes:
- .:/code
ports:
- "8887:8887"