Skip to content

Instantly share code, notes, and snippets.

View ChefAustin's full-sized avatar
🤙
Rock'n'roll

Austin Culter ChefAustin

🤙
Rock'n'roll
  • Amsterdam, NL
View GitHub Profile
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strconv"
@nahun
nahun / README.md
Last active May 23, 2024 16:55
NetBox with Okta SSO using OAuth

NetBox with Okta SSO using OAuth

This is an example setup with NetBox using Okta for authentication. It uses the Python Social Auth library that is supported in NetBox starting in v3.1.

See the NetBox docs on SSO.

This is written to support NetBox v3.1.

Okta Setup

An OIDC application is required in Okta.

@mikeblum
mikeblum / pi-hole.nomad
Created December 11, 2021 23:45
Pi-hole on Nomad
job "pi-hole" {
datacenters = ["homelab"]
type = "system"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
constraint {
@nateberkopec
nateberkopec / homebridge.hcl
Created March 28, 2021 01:06
Pihole and homekit HCLs for Nomad
job "homebridge" {
datacenters = ["dc1"]
group "server" {
network {
port "http" {
to = 8581
}
}
#!/usr/local/autopkg/python
import os
import plistlib
from glob import glob
from Foundation import CFPreferencesCopyAppValue
# Input keys we don't care about comparing.
EXCLUDED_KEYS = (
@judaew
judaew / keychron_k2.adoc
Last active June 28, 2024 23:02
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@nikolay-n
nikolay-n / defsmon.py
Last active October 29, 2022 14:26
Defaults Monitor - tool to sniff defaults keys and values using unified log
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
'''
Defaults Monitor - tool to sniff defaults keys and values using unified log
to launch use standard python 2.7, eg python2.7 ./defsmon.py
'''
import os
@andrebrait
andrebrait / keychron_linux.md
Last active June 26, 2024 03:35
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@jomifepe
jomifepe / karabine_complex_rules.json
Last active July 7, 2022 11:48
MacOS Karabiner - Ducky One 2 Skyline
{
"title": "Portuguese Layout Fixes ({}, \\|, ~^, ºª, +*)",
"rules": [
{
"description": "Swap Command <-> Control (MANDATORY FOR ALL THE RULES)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control"
@pudquick
pudquick / fdsetup-for-crypt.mobileconfig
Created July 17, 2019 01:31
Enable fdesetup for Crypt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>Privacy Preferences Policy Control</string>
<key>PayloadIdentifier</key>