Skip to content

Instantly share code, notes, and snippets.

Tad DeVries taddev

Block or report user

Report or block taddev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@taddev
taddev / gihtubpage.conf
Last active May 20, 2019
NGINX Reverse proxy settings to Github pages
View gihtubpage.conf
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 {
@taddev
taddev / lock_wp-content.sh
Last active Aug 29, 2015
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.
View lock_wp-content.sh
#!/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 / gist:7275888
Last active May 2, 2016
Nginx reverse proxy settings for Exchange 2010/2013 autodiscover.
View gist:7275888
server {
listen 443;
server_name autodiscover.gwtest.us;
# Enable SSL
ssl on;
ssl_certificate /etc/ssl/nginx/mail.gwtest.us.crt;
ssl_certificate_key /etc/ssl/nginx/mail.gwtest.us.open.key;
ssl_session_timeout 5m;
@taddev
taddev / nginx.conf
Last active Oct 22, 2019
Nginx reverse proxy to Exchange 2010/2013
View nginx.conf
server {
listen 80;
#listen [::]:80;
server_name mail.gwtest.us autodiscover.gwtest.us;
return 301 https://$host$request_uri;
}
server {
listen 443;
#listen [::]:443 ipv6only=on;
@taddev
taddev / wp_secure.sh
Last active Dec 27, 2015
This is a BASH script that will change permissions on the various directories of a Wordpress site, including the entire site. The script assumes that you have a different user and group permissions set on the directory; the permissions on each folder and file should be defined something like this <user>:<web server user>. In this way your user a…
View wp_secure.sh
#!/bin/bash
#
# Copyright (C) 2013 Tad DeVries <tad@splunk.net>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@taddev
taddev / gist:6212449
Last active May 15, 2016
Nginx Reverse Proxy with custom error if upstream proxy is not working.
View gist:6212449
server {
listen 80;
listen [::]:80 default server ipv6only=on;
location / {
proxy_intercept_errors on;
proxy_pass http://localhost:9000;
}
error_page 500 502 503 504 /50x.html;
@taddev
taddev / listExample.c
Created Feb 28, 2013
This program demonstrates a simple doubly linked list used to store names and phone numbers. There are methods to add, search, edit, delete, and print records. This program ignores user input validation since pointer and memory manipulation are the key goals.
View listExample.c
/*
* Author: Tad DeVries <tad@splunk.net>
* Date: 2013/02/27
*
* Language: C
*
* Description: This program demonstrates a simple doubly linked list
* used to store names and phone numbers. There are methods to add, search,
* edit, delete, and print records. This program ignores user input validation
* since pointer and memory manipulation are the key goals.
@taddev
taddev / yamlStorage.class.php
Created Nov 25, 2012
YAML storage class providing simple inser/modify/delete operations.
View yamlStorage.class.php
<?php
/*
# Author: Tad DeVries
# Email: taddevries@gmail.com
# FileName: yamlStorage.class.php
#
# Description:
# This class provides a simple mechanism for inserting/modifying/deleting
# information in a YAML file.
#
@taddev
taddev / SignCode.ps1
Created Oct 27, 2012
Code Signing Script for Powershell
View SignCode.ps1
#
# Author: Tad DeVries
# Email: taddevries@gmail.com
# FileName: SignCode.ps1
#
# Description:
# Uses a codesigning certifcate in your certificate list
# to sign the code. You may need to edit the options below
# to select the correct certificate if you have more than
# one like I do.
@taddev
taddev / RunElevated.ps1
Created Oct 27, 2012
Create a sudo-like command for Powershell
View RunElevated.ps1
#
# Author: Tad DeVries
# Email: taddevries@gmail.com
# FileName: RunElevated.ps1
#
# Description:
# Creates a "sudo" like command to elevate another
# command to administrative level. This is used to
# simplify the CLI interaction and create a little
# home like feeling for the *nix users out there.
You can’t perform that action at this time.