Skip to content

Instantly share code, notes, and snippets.

@addisonhall
addisonhall / web.config
Last active November 24, 2018 21:45
WordPress on IIS web.config with headers and cache control. Be sure to update "http://mydomain.com" with your site domain.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="Vary"></remove>
<add name="Vary" value="Accept-Encoding"></add>
</customHeaders>
</httpProtocol>
<staticContent>
@palicko
palicko / acf-repeater-get-post-meta
Created May 29, 2017 15:44
ACF repeater via get_post_meta()
<?php
// Returns array with repeater subfields and its values
function repeater_get_post_meta( $repeater_key, $post_id, $sub_field_keys ) {
if ( ! $post_id ) {
$post_id = get_the_ID();
}
// get repeater field
$repeater = get_post_meta( get_the_ID(), $repeater_key, true );

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@rmoff
rmoff / gist:9687727
Last active July 21, 2020 20:33
XRDP - connect using any color (colour) depth

XRDP - connect using any color (colour) depth

XRDP version

xrdp 0.5.0

Problem

When connecting from mstsc or other RPD clients, unless specifying 24-bit colour depth (Millions), sesman fails. The Connection log just shows "error - problem connecting".