Skip to content

Instantly share code, notes, and snippets.

View adleviton's full-sized avatar

Adam Leviton adleviton

View GitHub Profile
@adleviton
adleviton / guide.md
Created February 13, 2025 17:01 — forked from strarsis/guide.md
Object caching with Bedrock (and Trellis) using Redis

Object caching with Bedrock (and Trellis) using Redis

What is object caching

While nginx microcaching already solves page caching (as of static, rarely changing WordPress pages), the performance for dynamically generated pages (like WooCommerce shop pages and admin backend in general) can benefit greatly from additionally using an object cache. Object caching allows an application (in this case WordPress with its plugins, theme, etc.) to store prepared objects (mostly database queries) in a database and quickly retrieve them, therefore improving the performance of dynamic page generation. Object caching is (usually) transparent, which means that it shouldn't be noticeable by users and developers (except for the performance improvements of course).

Implementations

@adleviton
adleviton / readme.md
Created February 17, 2024 02:21 — forked from troyfontaine/readme.md
Logging SFTP interactions on a Chrooted User in Ubuntu 14.04

How to setup SFTP Logging on Ubuntu 14.04 for a Chrooted User

Prerequisites: Using internal-sftp for sftp; rsyslog for logging

Step 1. Set up your chrooted directories

sudo mkdir /sftp/myshare
sudo mkdir /sftp/myothershare

Step 2. Create your groups for your chrooted users

@adleviton
adleviton / custom-permalink-from-meta.php
Created July 16, 2019 01:25 — forked from petenelson/custom-permalink-from-meta.php
WordPress permalink for custom post type based on post meta
@adleviton
adleviton / gist:7c4c09a4e376a396f534f2944413d369
Created September 25, 2018 18:10 — forked from petasittek/gist:1378951
Find all subdomains of given domain with dig
# let's dig the server
dig example.com
# from the DNS answer we are interested in the authority section
#;; AUTHORITY SECTION:
#example.com. 79275 IN NS a.iana-servers.net.
#example.com. 79275 IN NS b.iana-servers.net.
# now we find out all subdomains
dig @a.iana-servers.net example.com axfr