Skip to content

Instantly share code, notes, and snippets.

@mguay22
mguay22 / node-local-dns.sh
Created March 29, 2022 23:44
Node Local DNS Cache Installation
curl -sL https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml \
| sed -e 's/__PILLAR__DNS__DOMAIN__/cluster.local/g' \
| sed -e "s/__PILLAR__DNS__SERVER__/$(kubectl get service --namespace kube-system kube-dns -o jsonpath='{.spec.clusterIP}')/g" \
| sed -e 's/__PILLAR__LOCAL__DNS__/169.254.20.10/g' \
| kubectl apply -f -
@mguay22
mguay22 / functions.php
Created June 30, 2017 02:56
Custom WordPress Metabox
add_action( 'add_meta_boxes', 'mg_mb_create' );
function mg_mb_create() {
add_meta_box( 'mg-meta', 'My Custom Meta Box', 'mg_mb_function', 'post', 'normal', 'high' );
}
function mg_mb_function( $post ) {
// Retrieve the metadata values if they exist.