Skip to content

Instantly share code, notes, and snippets.

@kizzx2
kizzx2 / docker-compose.yml
Last active January 28, 2026 16:49
Restart a docker container periodically with docker-compose
version: '3'
services:
app:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stopped
restarter:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
@mattclements
mattclements / function.php
Last active January 23, 2026 16:08
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}