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 / bmw-full-from-stock-patch.diff
Last active February 6, 2026 04:17
BMW GHES 3.17.6 HAProxy remediation - complete templates + diff patch
diff --git a/etc/consul-templates/etc/haproxy/haproxy-cluster-proxy.cfg.ctmpl b/etc/consul-templates/etc/haproxy/haproxy-cluster-proxy.cfg.ctmpl
index 46cfe73bd6..719e8af90f 100644
--- a/etc/consul-templates/etc/haproxy/haproxy-cluster-proxy.cfg.ctmpl
+++ b/etc/consul-templates/etc/haproxy/haproxy-cluster-proxy.cfg.ctmpl
@@ -25,7 +25,7 @@ global
# Global maxconn is the sum of all the `listener` maxconn values, so that
# one listener's backlog filling doesn't deny connections to another listener.
# Increment accordingly as more services are added to this file.
- maxconn {{ multiply 1024 51 | add 15000 }}
+ maxconn 104088
@djdefi
djdefi / es-config-apply-summary.md
Last active February 5, 2026 01:06
ES + Config-Apply: The Problem and Proposed Fix

ES + Config-Apply: The Problem and Proposed Fix

The Problem

When Elasticsearch is unhealthy (red/yellow), ghe-config-apply blocks with exit 1. This has been causing customer outages for 7-8 years.

The irony: Customers often need to run config-apply to complete an upgrade that would fix ES. But config-apply won't run because ES is broken. It's a deadlock.

What ES Actually Contains

@djdefi
djdefi / ghe-best-practices.md
Last active August 24, 2022 17:13
GitHub Enterprise Server best practices
Loading
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) {