Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mister2d
mister2d / PolicyKit.conf
Created September 28, 2018 06:12 — forked from priyadarshan/PolicyKit.conf
FreeBSD 11 notebook installation cheat-sheet
# /usr/local/etc/PolicyKit/PolicyKit.conf
# Allow normal users to mount removable media automatically
<config version="0.1">
<match action="org.freedesktop.hal.storage.mount-removable">
<return result="yes"/>
</match>
<match action="org.freedesktop.hal.storage.mount-fixed">
<return result="yes"/>
</match>
@mister2d
mister2d / Vault-ssh-ca-README.md
Last active December 13, 2019 07:50 — forked from kawsark/Vault-ssh-ca-README.md
A guide for configuring Vault's SSH-CA

SSH CA use-case with Vault

In this scenario we are going to set up Vault to sign SSH keys using an internal CA. We will configure the SSH secrets engine and create a CA within Vault. We will then configure an SSH server to trust the CA key we just created. Finally we will attempt to SSH using a private key, and a public key signed by Vault SSH CA.

Prerequisites

  • This guide assumes you have already provisioned a Vault server, SSH host using OpenSSH server, and a SSH client machine.
  • The client system must be able to reach the Vault server and the OpenSSH server.
  • We will refer to these systems respectively as:
  • VAULT_SERVER
@mister2d
mister2d / .inputrc
Created March 23, 2020 05:04
Restore control keys in Linux terminal
## Assumed $TERM=xterm
# Include system-wide /etc/inputrc if you wish.
$include /etc/inputrc
"\eOD": backward-word
"\eOC": forward-word
"\e[1~": beginning-of-line
"\e[4~": end-of-line
@mister2d
mister2d / dnsmasq.conf
Created March 23, 2020 08:41
Disable systemd dns listener
I’m using a simple dnsmasq.
# Enable forward lookup of the 'consul' domain:
server=/consul/127.0.0.1#8600
# Accept DNS queries only from hosts whose address is on a local subnet.
local-service
If systemd resolver is running you’ll hit an issue since it’s already binding 127.0.0.1:53.
Add this to /etc/systemd/resolved.conf
@mister2d
mister2d / site.yml
Created July 22, 2020 00:01 — forked from gswallow/site.yml
Ansible tags are a code smell
---
- hosts: localhost
vars:
ansible_connection: local
tasks:
- name: demo an untagged task
debug:
msg: I am an untagged task
- name: demo a normal tagged task
@mister2d
mister2d / haproxy-ingress.hcl
Last active February 12, 2021 02:36
nomad job for HAProxy ingress
locals {
config = jsondecode(file("runnervars.json"))
}
job "ingress" {
region = "global"
datacenters = ["home"]
type = "service"
constraint {
locals {
config = jsondecode(file("runnervars.json"))
}
job "logging" {
datacenters = ["dc1"]
type = "service"
constraint {
attribute = "${attr.cpu.arch}"
{
"cniVersion": "0.4.0",
"name": "macvlan-plex",
"plugins": [
{
"type": "macvlan",
"master": "enp3s0f0v1",
"ipam": {
"type": "dhcp"
}
@mister2d
mister2d / resinstack.nomad
Created March 18, 2021 01:12
Simple Nomad job to deploy a VM using the qemu driver.
job "resinstack-small" {
datacenters = ["home"]
group "qcow2" {
constraint {
attribute = "${meta.node_type}"
value = "metal"
}
network {
@mister2d
mister2d / _README.md
Created March 17, 2022 08:20 — forked from oleq/_README.md
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |