Skip to content

Instantly share code, notes, and snippets.

@jmound
jmound / markdown-import.php
Created October 30, 2020 13:35 — forked from vlucas/markdown-import.php
Imports Markdown files in a local directory into a WordPress installation
<?php
// Turn on all error reporting so we can see if anything goes wrong
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);
// Relative path to your wp-config.php file (to connect to the database)
require '../wp-config.php';
require './frontmatter.php'; // Parses YAML frontmatter - https://github.com/Modularr/YAML-FrontMatter
require './Parsedown.php'; // Markdown parser - https://github.com/erusev/parsedown
@jmound
jmound / fail.md
Created October 4, 2019 17:07 — forked from coryodaniel/debug-containers.md
Connect to a failing kubernetes pod to inspect mounts, etc

Update the command/args:

command: [ "/bin/sh", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]

Run a command

kubectl exec my-pod -c my-container -- ls /
@jmound
jmound / 0_reuse_code.js
Created April 28, 2016 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console