Skip to content

Instantly share code, notes, and snippets.

@mister2d
mister2d / get-windows-license-key.sh
Created Sep 1, 2022
Print Windows Activation key from with Linux
View get-windows-license-key.sh
#!/bin/bash
strings /sys/firmware/acpi/tables/MSDM | tail -1
View id_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGQp6H/n2JPSt1VxCAupTC1OTh7R3eu7wO0ZtCNbAkd7
@mister2d
mister2d / _README.md
Created Mar 17, 2022 — forked from oleq/_README.md
A2DP audio streaming using Raspberry PI (Raspbian Jessie)
View _README.md

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  )))
 |
@mister2d
mister2d / resinstack.nomad
Created Mar 18, 2021
Simple Nomad job to deploy a VM using the qemu driver.
View resinstack.nomad
job "resinstack-small" {
datacenters = ["home"]
group "qcow2" {
constraint {
attribute = "${meta.node_type}"
value = "metal"
}
network {
View 10-macvlan-plex.conflist
{
"cniVersion": "0.4.0",
"name": "macvlan-plex",
"plugins": [
{
"type": "macvlan",
"master": "enp3s0f0v1",
"ipam": {
"type": "dhcp"
}
View loki_nomad_consul_connect.hcl
locals {
config = jsondecode(file("runnervars.json"))
}
job "logging" {
datacenters = ["dc1"]
type = "service"
constraint {
attribute = "${attr.cpu.arch}"
@mister2d
mister2d / haproxy-ingress.hcl
Last active Feb 12, 2021
nomad job for HAProxy ingress
View haproxy-ingress.hcl
locals {
config = jsondecode(file("runnervars.json"))
}
job "ingress" {
region = "global"
datacenters = ["home"]
type = "service"
constraint {
@mister2d
mister2d / site.yml
Created Jul 22, 2020 — forked from gswallow/site.yml
Ansible tags are a code smell
View site.yml
---
- 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 / dnsmasq.conf
Created Mar 23, 2020
Disable systemd dns listener
View dnsmasq.conf
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 / .inputrc
Created Mar 23, 2020
Restore control keys in Linux terminal
View .inputrc
## 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