Skip to content

Instantly share code, notes, and snippets.

@taddev
taddev / lock_wp-content.sh
Last active August 29, 2015 13:56
A series of scripts to manage the permissions for various wordpress directories in bulk. The *lock* scripts will remove write access to the files while the *unlock* scripts will add it.
#!/bin/bash
LOCKFILE="/home/tad/scripts/.unlocked_wp-content"
WPDIR="/var/www/localhost/htdocs/blog/wp/wp-content"
if [ -f $LOCKFILE ]; then
echo "Locking WP-Content Directory"
find $WPDIR -type f -exec chmod 644 {} \;
find $WPDIR -type d -exec chmod 755 {} \;
rm -f $LOCKFILE
@taddev
taddev / gihtubpage.conf
Last active March 5, 2025 18:17
NGINX Reverse proxy settings to Github pages
server {
listen 80 default_server;
listen [::]:80 ipv6only=on default_server;
server_name splunk.net blog.splunk.net www.splunk.net .taddevries.com;
access_log /var/log/nginx/blog.access_log main;
error_log /var/log/nginx/blog.error_log info;
return 301 https://blog.splunk.net;
}
server {