Skip to content

Instantly share code, notes, and snippets.

From ac676e08cd4b3df4ad723fc2acef250b49871659 Mon Sep 17 00:00:00 2001
From: Michael Wyraz <[email protected]>
Date: Thu, 6 Dec 2018 21:50:38 +0100
Subject: [PATCH] Make sort order work for custom post types
---
wp-sitemap-page.php | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/wp-sitemap-page.php b/wp-sitemap-page.php
#!/bin/bash
set -e
mkdir -p /run/apache2
rm -f /run/apache2/httpd.pid
echo "Waiting for database"
DB_READY=0
for i in {1..60}; do
/**
* D0 - output ok
* D5 - output ok
* D6 - output ok
* D7 - output ok
*
* D3 - output ok
* D4 - output ok, internal LED is inverse
*
* D3 - pullup input ok, bootet nicht wenn LOW
@micw
micw / rules.v4
Last active November 8, 2018 13:47
Minimal iptables for rancher 2 agent/kubernetes
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
# Masquerading all outgoing routet traffic
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
@micw
micw / build_with_docker.sh
Created September 22, 2018 07:02
Build aports with docker
#!/bin/sh
if [ "$#" -ne 2 ]; then
echo "USAGE: $0 ARCH REPO/PACKAGE"
echo "EXAMPLE $0 armhf main/busybox"
exit 1
fi
BASE=$( cd $( dirname $0 ); pwd)
/exports 127.0.0.1(fsid=0,async,ro)
/exports/vol1 *(async,no_subtree_check,no_auth_nlm,insecure,no_root_squash)
/exports/vol2 *(async,no_subtree_check,no_auth_nlm,insecure,no_root_squash)
@micw
micw / create docker network
Last active October 14, 2024 07:28
Setup macvlan device to use with docker
docker network create --driver=macvlan --subnet=192.168.1.0/24 --gateway 192.168.1.210 -o parent=eno1 -o macvlan_mode=bridge macvlan0
@micw
micw / README.md
Created May 24, 2018 11:21
Use letsencrypt cert generated by froxlor in postfix and dovecot
  • requires ansible to be installed
  • run periodically with:
ansible-playbook -i hosts.ini playbook.yml
@micw
micw / nginx_auth1.conf
Last active April 27, 2018 09:49
Nginx auth with login-form passthrough
# This variant uses the same endpoint for the check and the login form
server {
listen 80;
server_name localhost;
location = /internal-nginx-auth-endpoint {
internal;
proxy_pass http://172.17.0.1:8080/;
}
@micw
micw / update_config.py
Last active January 23, 2024 16:59
Python script to replace ${PLACEHOLDER} in config files with content from environment variables
#!/usr/bin/env python
#
# Replaces ${placeholder} in a config file by it's corresponding environment variable.
# Fails if a variable is missing.
#
# The latest version of this script can be found at https://gist.github.com/micw/d7c0e34aee751e81c5aa952b29b8631b
#
import argparse,re
from os import environ