Skip to content

Instantly share code, notes, and snippets.

View headmin's full-sized avatar

Henry Stamerjohann headmin

View GitHub Profile
### Keybase proof
I hereby claim:
* I am headmin on github.
* I am headmin (https://keybase.io/headmin) on keybase.
* I have a public key whose fingerprint is 072B 1D80 A9D7 D89A E6DD B6A5 630C CD5F 7073 6BAB
To claim this, I am signing this object:
#ubuntu server setup
#install ubuntu 13.10 server 64-bit on VMware with easy install
#put this script file in guest OS and run
#this includes:
# vmware hgfs,
# correct timezone (HKT),
# ssh,
# git,
# docker
@headmin
headmin / base.json
Last active November 29, 2016 20:46
example full base.json with extra links and integration examples for inventory Watchman, JAMF Pro, Sal and actions for Mattermost, Slack Pushover, Twilio/SMS, Zendesk, Trello
{
"extra_links": [
{"anchor_text": "JAMF Pro",
"url": "https://jamf-pro.example.org.de:8443"},
{"anchor_text": "Kibana",
"url": "https://zentral.example.org/kibana/"},
{"anchor_text": "Prometheus",
"url": "https://zentral.example.org/prometheus/"},
{"anchor_text": "Watchman",
"url": "https://example.monitoringclient.com"},
#!/usr/local/bin/python3
"""
Custom inventory script for Ansible populated by the JSS
"""
from os.path import dirname, realpath, join
from urllib.parse import quote
import argparse
import json
import configparser
@headmin
headmin / README.md
Created April 2, 2017 00:57 — forked from scy/README.md
My OSX PF config for #30C3.

My OS X “VPN only” Setup For #30C3

You should never let passwords or private data be transmitted over an untrusted network (your neighbor’s, the one at Starbucks or the company) anyway, but on a hacker congress like the #30C3, this rule is almost vital.

Hackers get bored easily, and when they’re bored, they’re starting to look for things to play with. And a network with several thousand connected users is certainly an interesting thing to play with. Some of them might start intercepting the data on the network or do other nasty things with the packets that they can get.

If these packets are encrypted, messing with them is much harder (but not impossible! – see the end of this article). So you want your packets to be always encrypted. And the best way to do that is by using a VPN.

Target audience

@headmin
headmin / Jamf
Last active January 30, 2018 13:44 — forked from parking-meter/Jamf
q
a
@headmin
headmin / profileGen.py
Created November 9, 2018 11:04 — forked from acidprime/profileGen.py
Simple Python Example for Generating 10.7 (Lion) 8021x .mobileconfig Profiles
#!/usr/bin/python -tt
__author__ = 'Zack Smith @acidprime'
__version__ = '0.1'
import sys
import getopt
from Cocoa import NSMutableDictionary
global debugEnabled
debugEnabled = True
@headmin
headmin / bash_strict_mode.md
Created March 18, 2021 11:15 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o pipefail explanation

set -e, -u, -o pipefail

The "set" lines These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing. With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.

set -euo pipefail is short for:

set -e
set -u

How to install Ansible and Python on macOS - simply in minutes

Here we are going to install the latest Python (3.11.2 as of this writing) and Ansible on macOS Ventura in the most clever and simplistic way. All artifacts are installed in user and not system context.

How does it work? The awesome asdf-vm project is designed for version management of developer runtimes. Here we use a small feature to also directly install default-python-packages and pick Ansible as our choice (could be pipenv or others).

Some features here have been presented in my talk "Runtime and tools – version management on macOS" at the MDO:YVR 2022 conference.

Requirements