Skip to content

Instantly share code, notes, and snippets.

View djdefi's full-sized avatar
🤠

Ryan Trauntvein djdefi

🤠
  • GitHub Staff
  • California
View GitHub Profile
@djdefi
djdefi / ghe-best-practices.md
Last active August 24, 2022 17:13
GitHub Enterprise Server best practices
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@djdefi
djdefi / .gitignore
Last active April 19, 2022 13:54
Wordpress change tracking with Git
# Keep these files out of the repo
/wp-content/themes/twenty*
/wp-content/upgrade
/wp-content/uploads
/sitemap.*
/wp-config.php
*.sql
# Hidden files
*.DS_Store
#!/usr/bin/python
import os
import sys
import csv
import datetime
import time
import twitter
def test():
@djdefi
djdefi / apache-antibot.conf
Created June 13, 2014 22:35
Amazon AMI - Wordpress fail2ban anti-bot
# Fail2Ban Configuration File
#
# filter.d/apache-antibot.conf
#
#
# match stuff like this from *access.log from a dummy NameVirtualHost or a normal NameVirtualHost
# the dummy host always returns 403 via rewrite rule
#
# match all 404s or 403s where url contains special "badurl" parts
#
@djdefi
djdefi / mailboxdelegates.ps1
Created June 4, 2014 23:47
Get list of Exchange Delegates
$AllUsers = Get-Mailbox * -resultsize:unlimited
ForEach ($Alias in $AllUsers)
{
$Mailbox = "" + $Alias.Name + ":\Inbox"
Get-MailboxFolderPermission -identity $Mailbox | Select User,FolderName,AccessRights `
| Ft $Mailbox,User,FolderName,AccessRights >> delegates.csv
}
@djdefi
djdefi / clean-exchange2013-logs.ps1
Last active August 29, 2015 13:57
Powershell script to clean out Exchange 2013 log files - Taken from http://www.c7solutions.com/2013/04/removing-old-exchange-2013-log-files-html
Set-Executionpolicy RemoteSigned
$days=30 #You can change the number of days here
$IISLogPath="C:\inetpub\logs\LogFiles\"
$ExchangeLoggingPath="C:\Program Files\Microsoft\Exchange Server\V15\Logging\"
Write-Host "Removing IIS and Exchange logs; keeping last" $days "days"
Function CleanLogfiles($TargetFolder)
{
if (Test-Path $TargetFolder) {