Skip to content

Instantly share code, notes, and snippets.

affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app.kubernetes.io/instance"
operator: In
values:
<?php
/*
Plugin Name: Block URLs
Plugin URI: https://dustinrue.com
Description: Block select domains from being accessed by WordPress. Rather than blocking all domains, this plugin allows you to block just specific domains instead.
Author: Dustin Rue
Version: 0.0.1
*/
/*
cat build_c8_image.sh
#!/bin/bash
. ./diskbuilder/bin/activate
export DIB_DEV_USER_PWDLESS_SUDO=true
export DIB_RELEASE=8
rm -f images/image.vdi
rm -f images/image.raw
input_boolean:
house_fan:
name: "House Fan"
initial: off
icon: mdi:fan
house_fan:
friendly_name: "House Fan"
value_template: "{{ is_state('input_boolean.house_fan', 'on') }}"
turn_on:
@dustinrue
dustinrue / mariadb.rb
Created November 3, 2018 15:26
homebrew mariadb formulae to build the aws key management plugin
class Mariadb < Formula
desc "Drop-in replacement for MySQL"
homepage "https://mariadb.org/"
url "https://downloads.mariadb.org/f/mariadb-10.3.10/source/mariadb-10.3.10.tar.gz"
sha256 "57767c048982811c7ab21d8527f6f36aa897386e8c7235f11b5505a924d68eda"
bottle do
sha256 "eec1102078f2ed74ee9e4f4fdba5a2b1c41d883b4499309034690b1aa7ea303a" => :mojave
sha256 "936859611a5206ff3f13cb99ec69eb1344bab3734a14ad8a35ff276dac6f83a4" => :high_sierra
sha256 "e946558c449fdb9686df3f82fdb5ce7ab192f2ccf0d88f18ece27a51932a2000" => :sierra
upstream ups {
server 192.168.86.251;
}
server {
location /ups {
proxy_pass http://ups/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
- name: Disable SE Linux
selinux:
state: disabled
register: selinux
tags:
- selinux
- block:
- name: Restart and wait on server if selinux changed
shell: sleep 2 && shutdown -r now "Ansible package updates triggered"
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>
#include <SimpleTimer.h>
#define DHTPIN 2
#define DHTTYPE DHT22
const char* ssid = "ssid";
const char* password = "password";
aws ec2 describe-images \
--owners 'aws-marketplace' \
--filters 'Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce' \
--query 'sort_by(Images, &CreationDate)[-1].[ImageId]' \
--output 'text'
mkdir -p /opt/minio/data
mkdir /opt/minio/cofig
docker run -d -p 9000:9000 \
--name minio \
-v /opt/minio/data:/data \
-v /opt/minio/config:/root/.minio \
minio/minio server /data